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: Mon, 14 Jan 2013 12:07:38 +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 Sun, 13 Jan 2013 15:09:25 +0100, Jan Djärv <address@hidden> said:

> A question, there might be smoothing on both left and right sides of
> a glyph, for instance Y may do this.  Don't you need to take the
> left side into account?

Yes, indeed.

                                     YAMAMOTO Mitsuharu
                                address@hidden

=== modified file 'src/macfont.c'
*** src/macfont.c       2013-01-11 07:33:09 +0000
--- src/macfont.c       2013-01-14 03:02:40 +0000
***************
*** 483,488 ****
--- 483,490 ----
        METRICS_SET_VALUE (metrics, descent, status);} while (0)
  
  #define METRICS_NCOLS_PER_ROW (128)
+ #define LCD_FONT_SMOOTHING_LEFT_MARGIN        (0.396)
+ #define LCD_FONT_SMOOTHING_RIGHT_MARGIN       (0.396)
  
  static int
  macfont_glyph_extents (struct font *font, CGGlyph glyph,
***************
*** 579,584 ****
--- 581,592 ----
                                     / (CGFloat) WIDTH_FRAC_SCALE));
              break;
            }
+         if (bounds.size.width > 0)
+           {
+             bounds.origin.x -= LCD_FONT_SMOOTHING_LEFT_MARGIN;
+             bounds.size.width += (LCD_FONT_SMOOTHING_LEFT_MARGIN
+                                   + 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]