]> code.delx.au - gnu-emacs/commitdiff
* macfont.m (macfont_draw): Use s->ybase for correct y position.
authorJan Djärv <jan.h.d@swipnet.se>
Wed, 2 Oct 2013 18:52:34 +0000 (20:52 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Wed, 2 Oct 2013 18:52:34 +0000 (20:52 +0200)
src/ChangeLog
src/macfont.m

index 1bdda53f335ae562f86ed74e3abe022928b3d750..6af5b2ee086d4cd8fd5d6a39a2eb166470593c96 100644 (file)
@@ -1,3 +1,9 @@
+2013-10-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * macfont.m (mac_ctfont_create_preferred_family_for_attributes): Remove
+       unised variable (from mac-port).
+       (macfont_draw): Use s->ybase for correct y position.
+
 2013-10-02  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * frame.h (struct frame): Drop has_minibuffer member because...
index cb913991e063284f8351c8687a030791db5631f5..206a810c239d15d742ef87f6459b017a8e7fa160 100644 (file)
@@ -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;