changeset 105160:8f8d95750940

* nsfont.m (ns_glyph_metrics): Remove GNUstep conditional for glyph advancement.
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Wed, 23 Sep 2009 18:21:04 +0000
parents 4b9dd8a2de69
children 6328a1c36ddb
files src/nsfont.m
diffstat 1 files changed, 2 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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 <AppKit/NSFontDescriptor.h>
 #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;