summaryrefslogtreecommitdiff
path: root/src/macfont.m
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2013-10-02 20:52:34 +0200
committerJan Djärv <jan.h.d@swipnet.se>2013-10-02 20:52:34 +0200
commitc348360a2bdf390fff9883c4c922804a67c9cc9e (patch)
treeab42abee1bbb577ce4fa69a2908c3112b52e403a /src/macfont.m
parent1a23cd48f50ce6accd6f9c22649a4b4d50611dd1 (diff)
* macfont.m (macfont_draw): Use s->ybase for correct y position.
Diffstat (limited to 'src/macfont.m')
-rw-r--r--src/macfont.m6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/macfont.m b/src/macfont.m
index cb913991e0..206a810c23 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2720,7 +2720,7 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y,
CGFloat font_size = mac_font_get_size (macfont);
CGAffineTransform atfm;
CGFloat advance_delta = 0;
- int y_draw = -y-FONT_BASE (s->font);
+ int y_draw = -s->ybase;
int no_antialias_p =
(macfont_info->antialias == MACFONT_ANTIALIAS_OFF
|| (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT
@@ -3321,10 +3321,8 @@ mac_ctfont_create_preferred_family_for_attributes (CFDictionaryRef attributes)
CFStringRef result = NULL;
CFStringRef charset_string =
CFDictionaryGetValue (attributes, MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE);
- CFIndex length;
- if (charset_string
- && (length = CFStringGetLength (charset_string)) > 0)
+ if (charset_string && CFStringGetLength (charset_string) > 0)
{
CFAttributedStringRef attr_string = NULL;
CTLineRef ctline = NULL;