* 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. Fixes: debbugs:18876
This commit is contained in:
parent
95af181d66
commit
4e0cc3517b
2 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,10 @@
|
|||
2014-10-31 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* 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).
|
||||
|
||||
|
|
|
@ -1101,7 +1101,7 @@ static void mac_font_get_glyphs_for_variants (CFDataRef, UTF32Char,
|
|||
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 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
|
|||
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 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue