unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: Chris Zheng <chrisdcheng@gmail.com>, emacs-devel@gnu.org
Subject: Re: State of NS port
Date: Mon, 14 Jan 2013 12:07:38 +0900	[thread overview]
Message-ID: <wlzk0ccvid.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <0DAA2EAD-18D8-461B-BF9E-F297CF50C53A@swipnet.se>

>>>>> On Sun, 13 Jan 2013 15:09:25 +0100, Jan Djärv <jan.h.d@swipnet.se> 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
				mituharu@math.s.chiba-u.ac.jp

=== 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	other threads:[~2013-01-14  3:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 16:27 State of NS port Adrian Robert
2013-01-10 18:53 ` chad
2013-01-10 19:28 ` Stefan Monnier
2013-01-12  3:49 ` Chris Zheng
2013-01-12 10:09   ` Jan Djärv
2013-01-14  2:44     ` Chris Zheng
2013-01-14  9:35       ` Jan Djärv
2013-01-12 14:58   ` Harald Hanche-Olsen
2013-01-12 16:41     ` Jan Djärv
2013-01-15 17:57       ` Adrian Robert
2013-01-15 20:47         ` Jan Djärv
2013-01-16 13:46           ` Adrian Robert
2013-01-13  8:14   ` YAMAMOTO Mitsuharu
2013-01-13 12:23     ` Jan Djärv
2013-01-13 14:09     ` Jan Djärv
2013-01-14  3:07       ` YAMAMOTO Mitsuharu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-11  1:38 David Kanter
2013-01-11 16:13 ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlzk0ccvid.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=chrisdcheng@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=jan.h.d@swipnet.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).