* nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement

for screen font.
(nsfont_draw): Turn off LCD-smoothing.

Fixes: debbugs:11484
This commit is contained in:
Jan Djärv 2012-10-21 20:48:11 +02:00
parent 5ec86886a7
commit ef44695952
2 changed files with 17 additions and 1 deletions

View file

@ -1,5 +1,9 @@
2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
* nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
for screen font.
(nsfont_draw): Turn off LCD-smoothing (Bug#11484).
* xterm.c (x_focus_changed): Check if daemonp when sending focus in
event (Bug#12681).

View file

@ -797,7 +797,13 @@ when setting family in ns_spec_to_descriptor(). */
block_input ();
/* for metrics */
#ifdef NS_IMPL_COCOA
sfont = [nsfont screenFontWithRenderingMode:
NSFontAntialiasedIntegerAdvancementsRenderingMode];
#else
sfont = [nsfont screenFont];
#endif
if (sfont == nil)
sfont = nsfont;
@ -1229,6 +1235,7 @@ is false when (FROM > 0 || TO < S->nchars). */
else
CGContextSetShouldAntialias (gcontext, 1);
CGContextSetShouldSmoothFonts (gcontext, NO);
CGContextSetTextMatrix (gcontext, fliptf);
if (bgCol != nil)
@ -1372,7 +1379,12 @@ is false when (FROM > 0 || TO < S->nchars). */
#endif
block_input ();
sfont = [font_info->nsfont screenFont];
#ifdef NS_IMPL_COCOA
sfont = [font_info->nsfont screenFontWithRenderingMode:
NSFontAntialiasedIntegerAdvancementsRenderingMode];
#else
sfont = [font_info->nsfont screenFont];
#endif
font_info->metrics[block] = xzalloc (0x100 * sizeof (struct font_metrics));
if (!(font_info->metrics[block]))