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: Mon, 14 Jan 2013 12:07:38 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <69E12347-B799-48E4-AE1A-115365CEA4C8@gmail.com> <22C1B7A8E2294F08983ACE6BA77A7346@gmail.com> <0DAA2EAD-18D8-461B-BF9E-F297CF50C53A@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1358132876 31578 80.91.229.3 (14 Jan 2013 03:07:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2013 03:07:56 +0000 (UTC) Cc: Chris Zheng , emacs-devel@gnu.org To: Jan =?ISO-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 14 04:08:11 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 1TuaPA-0001Q2-Gq for ged-emacs-devel@m.gmane.org; Mon, 14 Jan 2013 04:08:08 +0100 Original-Received: from localhost ([::1]:38616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuaOu-0002hR-9S for ged-emacs-devel@m.gmane.org; Sun, 13 Jan 2013 22:07:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuaOp-0002gb-Gj for emacs-devel@gnu.org; Sun, 13 Jan 2013 22:07:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuaOm-0005EX-9v for emacs-devel@gnu.org; Sun, 13 Jan 2013 22:07:47 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:56628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuaOl-0005DQ-PD for emacs-devel@gnu.org; Sun, 13 Jan 2013 22:07:44 -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 23A55C056B; Mon, 14 Jan 2013 12:07:38 +0900 (JST) In-Reply-To: <0DAA2EAD-18D8-461B-BF9E-F297CF50C53A@swipnet.se> 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:156333 Archived-At: >>>>> On Sun, 13 Jan 2013 15:09:25 +0100, Jan Dj=E4rv = 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 =3D=3D=3D 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) =20 #define METRICS_NCOLS_PER_ROW (128) + #define LCD_FONT_SMOOTHING_LEFT_MARGIN (0.396) + #define LCD_FONT_SMOOTHING_RIGHT_MARGIN (0.396) =20 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 -=3D LCD_FONT_SMOOTHING_LEFT_MARGIN; + bounds.size.width +=3D (LCD_FONT_SMOOTHING_LEFT_MARGIN + + LCD_FONT_SMOOTHING_RIGHT_MARGIN); + } bounds =3D CGRectIntegral (bounds); METRICS_SET_VALUE (cache, lbearing, CGRectGetMinX (bounds)); METRICS_SET_VALUE (cache, rbearing, CGRectGetMaxX (bounds));