From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: State of NS port Date: Sun, 13 Jan 2013 17:14:24 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <69E12347-B799-48E4-AE1A-115365CEA4C8@gmail.com> <22C1B7A8E2294F08983ACE6BA77A7346@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1358064882 16859 80.91.229.3 (13 Jan 2013 08:14:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jan 2013 08:14:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chris Zheng Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 13 09:15:00 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TuIiZ-0005GC-Ta for ged-emacs-devel@m.gmane.org; Sun, 13 Jan 2013 09:15:00 +0100 Original-Received: from localhost ([::1]:39148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuIiJ-0003ID-QI for ged-emacs-devel@m.gmane.org; Sun, 13 Jan 2013 03:14:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuIiB-0003I7-4l for emacs-devel@gnu.org; Sun, 13 Jan 2013 03:14:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuIi6-0005d8-EZ for emacs-devel@gnu.org; Sun, 13 Jan 2013 03:14:35 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:57021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuIi5-0005ca-Us for emacs-devel@gnu.org; Sun, 13 Jan 2013 03:14:30 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 2D0E7C0562; Sun, 13 Jan 2013 17:14:24 +0900 (JST) In-Reply-To: <22C1B7A8E2294F08983ACE6BA77A7346@gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156297 Archived-At: >>>>> On Sat, 12 Jan 2013 11:49:09 +0800, Chris Zheng 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));