[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111175: * nsfont.m (LCD_SMOOTHING
From: |
Jan D. |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111175: * nsfont.m (LCD_SMOOTHING_MARGIN): New define. |
Date: |
Sun, 13 Jan 2013 15:29:22 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111175
committer: Jan D. <address@hidden>
branch nick: emacs-24
timestamp: Sun 2013-01-13 15:29:22 +0100
message:
* nsfont.m (LCD_SMOOTHING_MARGIN): New define.
(nsfont_draw): Remove disabling of LCD smoothing.
(ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
Bug#11484 with LCD smooting on.
modified:
src/ChangeLog
src/nsfont.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-01-12 19:31:25 +0000
+++ b/src/ChangeLog 2013-01-13 14:29:22 +0000
@@ -1,3 +1,10 @@
+2013-01-13 Jan Djärv <address@hidden>
+
+ * nsfont.m (LCD_SMOOTHING_MARGIN): New define.
+ (nsfont_draw): Remove disabling of LCD smoothing.
+ (ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
+ Bug#11484 with LCD smooting on.
+
2013-01-11 Rainer Orth <address@hidden> (tiny change)
* gtkutil.c (xg_initialize): Backport from trunk.
=== modified file 'src/nsfont.m'
--- a/src/nsfont.m 2013-01-01 09:11:05 +0000
+++ b/src/nsfont.m 2013-01-13 14:29:22 +0000
@@ -44,6 +44,7 @@
#endif
#define NSFONT_TRACE 0
+#define LCD_SMOOTHING_MARGIN 2
extern Lisp_Object Qns;
extern Lisp_Object Qnormal, Qbold, Qitalic, Qcondensed, Qexpanded;
@@ -1235,7 +1236,6 @@
else
CGContextSetShouldAntialias (gcontext, 1);
- CGContextSetShouldSmoothFonts (gcontext, NO);
CGContextSetTextMatrix (gcontext, fliptf);
if (bgCol != nil)
@@ -1401,11 +1401,12 @@
lb = r.origin.x;
rb = r.size.width - w;
+ // Add to bearing for LCD smoothing. We don't know if it is there.
if (lb < 0)
- metrics->lbearing = round (lb);
+ metrics->lbearing = round (lb - LCD_SMOOTHING_MARGIN);
if (font_info->ital)
rb += 0.22 * font_info->height;
- metrics->rbearing = lrint (w + rb);
+ metrics->rbearing = lrint (w + rb + LCD_SMOOTHING_MARGIN);
metrics->descent = r.origin.y < 0 ? -r.origin.y : 0;
/*lrint (hshrink * [sfont ascender] + expand * hd/2); */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111175: * nsfont.m (LCD_SMOOTHING_MARGIN): New define.,
Jan D. <=