From: Adrian Robert Date: Wed, 23 Sep 2009 18:21:04 +0000 (+0000) Subject: * nsfont.m (ns_glyph_metrics): Remove GNUstep conditional for X-Git-Tag: emacs-pretest-23.1.90~1184 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6e2f42b41acab96801734b1b6fc420bf5603c1ff;p=emacs.git * nsfont.m (ns_glyph_metrics): Remove GNUstep conditional for glyph advancement. --- diff --git a/src/nsfont.m b/src/nsfont.m index 16d6671f7bf..60e217fdc24 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -37,7 +37,7 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu) #include "character.h" #include "font.h" -/* This header is not included from GNUstep's (0.16.0) AppKit.h. */ +/* TODO: Drop once we can assume gnustep-gui 0.17.1. */ #ifdef NS_IMPL_GNUSTEP #import #endif @@ -1397,16 +1397,7 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block) float w, lb, rb; NSRect r = [sfont boundingRectForGlyph: g]; -#ifdef NS_IMPL_GNUSTEP - { - /* lord help us */ - NSString *s = [NSString stringWithFormat: @"%c", g]; - w = [sfont widthOfString: s]; - } -#else - w = [sfont advancementForGlyph: g].width; -#endif - w = max (w, 2.0); + w = max ([sfont advancementForGlyph: g].width, 2.0); metrics->width = lrint (w); lb = r.origin.x;