From 0970684011962a7bda6b5b27578f2877dcfc914d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=ADn?= Date: Fri, 5 Nov 2021 23:24:27 +0100 Subject: [PATCH] Fix GNUstep build (ns_compute_glyph_string_overhangs) * 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index f3dd0d791ca..54989a23735 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -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 -- 2.39.2