]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix GNUstep build (ns_compute_glyph_string_overhangs)
authorDaniel Martín <mardani29@yahoo.es>
Fri, 5 Nov 2021 22:24:27 +0000 (23:24 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 5 Nov 2021 22:24:33 +0000 (23:24 +0100)
* src/nsterm.m (ns_compute_glyph_string_overhangs): Declare the font
variable so that it's in scope for the GNUstep code.

src/nsterm.m

index f3dd0d791ca2a8c037fbb3379eef37284017606d..54989a2373531c432444f67b39279e9316b935e9 100644 (file)
@@ -2849,12 +2849,13 @@ ns_compute_glyph_string_overhangs (struct glyph_string *s)
      External (RIF); compute left/right overhang of whole string and set in s
    -------------------------------------------------------------------------- */
 {
+  struct font *font = s->font;
+
   if (s->char2b)
     {
       struct font_metrics metrics;
       if (s->first_glyph->type == CHAR_GLYPH && !s->font_not_found_p)
         {
-          struct font *font = s->font;
           font->driver->text_extents (font, s->char2b, s->nchars, &metrics);
           s->left_overhang = -metrics.lbearing;
           s->right_overhang