]> code.delx.au - gnu-emacs/blobdiff - src/macfont.m
'temacs -nw' should not call missing functions
[gnu-emacs] / src / macfont.m
index 366d087f8c208f6f5bb3949918624973fa4a7f78..fb28dc85d0ffc1f18483d0d12919fb71b61f7d22 100644 (file)
@@ -1,5 +1,5 @@
 /* Font driver on Mac OSX Core text.
-   Copyright (C) 2009-2014 Free Software Foundation, Inc.
+   Copyright (C) 2009-2015 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -1086,7 +1086,7 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
               bounds.size =
                 CGSizeApplyAffineTransform (bounds.size, synthetic_italic_atfm);
             }
-          if (macfont_info->synthetic_bold_p)
+          if (macfont_info->synthetic_bold_p && ! force_integral_p)
             {
               CGFloat d =
                 - synthetic_bold_factor * mac_font_get_size (macfont) / 2;
@@ -2692,7 +2692,8 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y,
   CGPoint *positions;
   CGFloat font_size = mac_font_get_size (macfont_info->macfont);
   bool no_antialias_p =
-    (macfont_info->antialias == MACFONT_ANTIALIAS_OFF
+    (NILP (ns_antialias_text)
+     || macfont_info->antialias == MACFONT_ANTIALIAS_OFF
      || (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT
          && font_size <= macfont_antialias_threshold));
   int len = to - from;
@@ -2755,7 +2756,7 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y,
         atfm = synthetic_italic_atfm;
       else
         atfm = CGAffineTransformIdentity;
-      if (macfont_info->synthetic_bold_p)
+      if (macfont_info->synthetic_bold_p && ! no_antialias_p)
         {
           CGContextSetTextDrawingMode (context, kCGTextFillStroke);
           CGContextSetLineWidth (context, synthetic_bold_factor * font_size);