diff options
| author | Adrian Robert | 2009-09-23 18:21:04 +0000 |
|---|---|---|
| committer | Adrian Robert | 2009-09-23 18:21:04 +0000 |
| commit | 6e2f42b41acab96801734b1b6fc420bf5603c1ff (patch) | |
| tree | febd0cdbeea0b4b53940d4e6a88f7232ab742b75 /src | |
| parent | 6aba198c838d175fd2f2e08d48042a1ad1b59717 (diff) | |
| download | emacs-6e2f42b41acab96801734b1b6fc420bf5603c1ff.tar.gz emacs-6e2f42b41acab96801734b1b6fc420bf5603c1ff.zip | |
* nsfont.m (ns_glyph_metrics): Remove GNUstep conditional for
glyph advancement.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsfont.m | 13 |
1 files changed, 2 insertions, 11 deletions
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) | |||
| 37 | #include "character.h" | 37 | #include "character.h" |
| 38 | #include "font.h" | 38 | #include "font.h" |
| 39 | 39 | ||
| 40 | /* This header is not included from GNUstep's (0.16.0) AppKit.h. */ | 40 | /* TODO: Drop once we can assume gnustep-gui 0.17.1. */ |
| 41 | #ifdef NS_IMPL_GNUSTEP | 41 | #ifdef NS_IMPL_GNUSTEP |
| 42 | #import <AppKit/NSFontDescriptor.h> | 42 | #import <AppKit/NSFontDescriptor.h> |
| 43 | #endif | 43 | #endif |
| @@ -1397,16 +1397,7 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block) | |||
| 1397 | float w, lb, rb; | 1397 | float w, lb, rb; |
| 1398 | NSRect r = [sfont boundingRectForGlyph: g]; | 1398 | NSRect r = [sfont boundingRectForGlyph: g]; |
| 1399 | 1399 | ||
| 1400 | #ifdef NS_IMPL_GNUSTEP | 1400 | w = max ([sfont advancementForGlyph: g].width, 2.0); |
| 1401 | { | ||
| 1402 | /* lord help us */ | ||
| 1403 | NSString *s = [NSString stringWithFormat: @"%c", g]; | ||
| 1404 | w = [sfont widthOfString: s]; | ||
| 1405 | } | ||
| 1406 | #else | ||
| 1407 | w = [sfont advancementForGlyph: g].width; | ||
| 1408 | #endif | ||
| 1409 | w = max (w, 2.0); | ||
| 1410 | metrics->width = lrint (w); | 1401 | metrics->width = lrint (w); |
| 1411 | 1402 | ||
| 1412 | lb = r.origin.x; | 1403 | lb = r.origin.x; |