[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117649: * macfont.m (macfont_glyph_extents): Tur
From: |
Jan D. |
Subject: |
[Emacs-diffs] emacs-24 r117649: * macfont.m (macfont_glyph_extents): Turn off syntetic bold |
Date: |
Fri, 31 Oct 2014 18:41:14 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117649
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18876
committer: Jan D. <address@hidden>
branch nick: emacs-24
timestamp: Fri 2014-10-31 19:41:07 +0100
message:
* macfont.m (macfont_glyph_extents): Turn off syntetic bold
if force_integral_p (i.e. no antialias).
(macfont_draw): Check ns_antialias_text, also turn off syntetic
bold if no antialias.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/macfont.m macfont.m-20130915173740-04lgloz0557bz98l-2
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-10-31 15:18:36 +0000
+++ b/src/ChangeLog 2014-10-31 18:41:07 +0000
@@ -1,5 +1,10 @@
2014-10-31 Jan Djärv <address@hidden>
+ * macfont.m (macfont_glyph_extents): Turn off syntetic bold
+ if force_integral_p (i.e. no antialias).
+ (macfont_draw): Check ns_antialias_text, also turn off syntetic
+ bold if no antialias (Bug#18876).
+
* emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
was given (Bug#18846).
=== modified file 'src/macfont.m'
--- a/src/macfont.m 2014-09-22 05:34:05 +0000
+++ b/src/macfont.m 2014-10-31 18:41:07 +0000
@@ -1101,7 +1101,7 @@
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;
@@ -2768,7 +2768,8 @@
CGFloat advance_delta = 0;
int y_draw = -s->ybase;
int 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));
@@ -2792,7 +2793,7 @@
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117649: * macfont.m (macfont_glyph_extents): Turn off syntetic bold,
Jan D. <=