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

Hello.

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?

	Jan D.

13 jan 2013 kl. 09:14 skrev YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>:

>>>>>> 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 14:09 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 [this message]
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=0DAA2EAD-18D8-461B-BF9E-F297CF50C53A@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=chrisdcheng@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    /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).