[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A patch for enforcing double-width CJK character display

From: 黄建忠
Subject: Re: A patch for enforcing double-width CJK character display
Date: Tue, 17 Apr 2012 13:02:04 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120327 Thunderbird/10.0.2

Hi, Miles.

I tried "Lucida Sans Typewriter" font, It seems Emacs git head(without cjk patch) had some problems to rendering this font.
See the attachment as reference.

Comparing to normal GTK applications(cairo rendering backend), it's too wide in Emacs.

I am not sure the problem is related to Emacs or libXft now, but it is a BUG.

My envs:
libXft-2.3.0 without patch.
fontconfig-2.8.0 without patch.
Freetype-2.4.9 with infinality rendering patchset.

于 2012年04月17日 12:56, Werner LEMBERG 写道:
  1) In case 1, a 20-character sequence of ASCII characters takes 180
     pixels to display, and a 10-character sequence of CJK characters
     takes 120 pixels to display.
Mhmm.  The silent assumption of making a CJK and ASCII font fit is
that double-width characters are really double width in relation to
single-width characters.  In your example, the width of two ASCII
characters is 18px, while one CJK character is 12px.  Such two fonts
simply don't fit, and no clever algorithm will be able to make them
ever fit without scaling.[1] Your arguments are thus moot IMHO.


[1] Not counting a full analysis of all glyphs of a font to check
     whether it is possible to compress the advance width horizontally
     because the left and right side bearings are large enough to do
     that without overlapping.

Huang JianZhong

Attachment: lucida.jpg
Description: JPEG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]