# HG changeset patch # User Adrian Robert # Date 1253730064 0 # Node ID 8f8d9575094067c152e0ee4ea9fd69797cff067d # Parent 4b9dd8a2de69260ea0fc287a4fa4c39723e03040 * nsfont.m (ns_glyph_metrics): Remove GNUstep conditional for glyph advancement. diff -r 4b9dd8a2de69 -r 8f8d95750940 src/nsfont.m --- a/src/nsfont.m Wed Sep 23 18:20:03 2009 +0000 +++ b/src/nsfont.m Wed Sep 23 18:21:04 2009 +0000 @@ -37,7 +37,7 @@ #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 @@ 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;