unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Chris Zheng <chrisdcheng@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: State of NS port
Date: Sun, 13 Jan 2013 17:14:24 +0900	[thread overview]
Message-ID: <wllibxlctb.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <22C1B7A8E2294F08983ACE6BA77A7346@gmail.com>

>>>>> On Sat, 12 Jan 2013 11:49:09 +0800, Chris Zheng <chrisdcheng@gmail.com> 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
				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-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));




  parent reply	other threads:[~2013-01-13  8:14 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 [this message]
2013-01-13 12:23     ` Jan Djärv
2013-01-13 14:09     ` Jan Djärv
2013-01-14  3:07       ` YAMAMOTO Mitsuharu
  -- 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=wllibxlctb.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 \
    /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).