emacs-devel
[Top][All Lists]
Advanced

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

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


From: Miles Bader
Subject: Re: A patch for enforcing double-width CJK character display
Date: Tue, 17 Apr 2012 14:52:19 +0900

Werner LEMBERG <address@hidden> writes:
>>  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.

Er, wait, what?

It can be done trivially, by adding 3 pixels of whitespace on both
sides of every CJK character...

[Which is the source of my concern:  that in some cases it might be so
much whitespace that the result looks funny.]

-miles

-- 
Consult, v.i. To seek another's disapproval of a course already decided on.



reply via email to

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