emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: State of NS port


From: YAMAMOTO Mitsuharu
Subject: Re: State of NS port
Date: Sun, 13 Jan 2013 17:14:24 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Sat, 12 Jan 2013 11:49:09 +0800, Chris Zheng <address@hidden> said:

> I suffered this problem too, and it's because of two bug fixes after I dig it 
> awhile. 
> bug#11484: 23.4; Scrolling leaves traces of old text behind

> http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-05/msg00383.html

I could reproduce it with the *Mac port*, so the problem would be that
the reported metrics don't exactly reflect the actual display when LCD
font smoothing is turned on.  I think I will apply the following
workaround in the next release of the Mac port.

                                     YAMAMOTO Mitsuharu
                                address@hidden

=== modified file 'src/macfont.c'
*** src/macfont.c       2013-01-11 07:33:09 +0000
--- src/macfont.c       2013-01-13 07:24:32 +0000
***************
*** 483,488 ****
--- 483,489 ----
        METRICS_SET_VALUE (metrics, descent, status);} while (0)
  
  #define METRICS_NCOLS_PER_ROW (128)
+ #define LCD_FONT_SMOOTHING_RIGHT_MARGIN       (0.396)
  
  static int
  macfont_glyph_extents (struct font *font, CGGlyph glyph,
***************
*** 579,584 ****
--- 580,587 ----
                                     / (CGFloat) WIDTH_FRAC_SCALE));
              break;
            }
+         if (bounds.size.width > 0)
+           bounds.size.width += LCD_FONT_SMOOTHING_RIGHT_MARGIN;
          bounds = CGRectIntegral (bounds);
          METRICS_SET_VALUE (cache, lbearing, CGRectGetMinX (bounds));
          METRICS_SET_VALUE (cache, rbearing, CGRectGetMaxX (bounds));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]