1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 08:11:05 -08:00

* 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 @@ nsfont_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size)
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 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
else
CGContextSetShouldAntialias (gcontext, 1);
CGContextSetShouldSmoothFonts (gcontext, NO);
CGContextSetTextMatrix (gcontext, fliptf);
if (bgCol != nil)
@ -1372,7 +1379,12 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
#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]))