emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src nsfont.m


From: Adrian Robert
Subject: [Emacs-diffs] emacs/src nsfont.m
Date: Wed, 23 Sep 2009 18:21:04 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Adrian Robert <arobert> 09/09/23 18:21:04

Modified files:
        src            : nsfont.m 

Log message:
                * nsfont.m (ns_glyph_metrics): Remove GNUstep conditional for
                glyph advancement.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsfont.m?cvsroot=emacs&r1=1.37&r2=1.38

Patches:
Index: nsfont.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsfont.m,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- nsfont.m    23 Sep 2009 02:36:57 -0000      1.37
+++ nsfont.m    23 Sep 2009 18:21:04 -0000      1.38
@@ -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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]