Commit 6e2f42b4 authored by Adrian Robert's avatar Adrian Robert
Browse files

* nsfont.m (ns_glyph_metrics): Remove GNUstep conditional for

	glyph advancement.
parent 6aba198c
......@@ -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 @@ WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). */
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment