[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: |
Sun, 15 Apr 2012 21:27:56 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120327 Thunderbird/10.0.2 |
Hi, Miles.
With fontconfig/Xft, emacs fontset setting is almost unnecessary for CJK
users. Applications should leave font auto-matched by fontconfig.
Also the fontset setting will introduce some problems, for example, If I
set a font for script HAN, I need find One font to support All CJK
characters,
and it is almost impossible, auto-matching is a good solution for using
proper font for proper charset.
The default font of Emacs is set to "Monospace 10", that's should be
good and enough for normal users, no more setup should be required.
Also, It's difficult for users to understand the details of "Encoding",
"Charset", "Script Han", "font spec string", etc.
Today, mainstream distributions of *nix always provide proper TrueType
fonts for CJK, mostly, the "small font situation" you mentioned should
not happened.
In fact, I think for these situations, the patch is not a problem, The
font itself is a big problem.
I tried to set font of "script Han" to a smaller size, It seems it can
be accepted, not so weird:-D.
Please refer to the attachment "smallfont.png", the settings is
Monospace 10 and YaHei 8 for script HAN.
If I continue to reduce the fontsize, the chinese characters are almost
unreadable, such setting means nothing for users.
Please refer to the attachment "smallest.png", the settings is Monospace
10, YaHei 4 for script HAN.
And the fix also handle the satuation of "such very small font size", If
the pixelwidth of CJK characters is even smaller than(or equal to) the
pixelwidth of Monospace font, I marked it as "Almost impossible":-D and
will not add space paddings to it.
By the way, the fix didn't affect "fontset setting" of emacs, since it
didn't care about font family or something else, it only cares about
font rendering and alignment.
I hope we can find a better way, vte/xterm/konsole... also suffer from
this issue.
于 2012年04月15日 13:10, Miles Bader 写道:
> Stefan Monnier <address@hidden> writes:
>>> Here is a problem the patch fixed, generally The pixel width of
>>> auto-matched CJK font is not exactly equals to double monospace font
>>> width. mostly, For same font size, the pixel width of CJK font is
>>> smaller than double pixel width of monospace font.
>> Ah, I see, thanks. I probably won't benefit much from it, but it seems
>> like a good feature to have.
> BTW, I hope there's a way to disable or tune this... Some CJK fonts seem
> to be very small (when rendered at the same size as other characters),
> and I think forcing them to be spaced with 2 * the width of the default
> font would make CJK characters look weird, with tons of whitespace in
> between each character....
>
> Part of the problem, of course, is that it's somewhat difficult / clunky
> for the user to customize which fonts get used for different character
> sets. There's `set-fontset-font', but I've found it to be sort of hard
> to control, as there doesn't seem to be any way of controlling its
> interaction with faces...
>
> [Is there a better way?]
>
> Thanks,
>
> -miles
>
--
Huang JianZhong
smallfont.png
Description: PNG image
smallest.png
Description: PNG image
- Re: A patch for enforcing double-width CJK character display, (continued)
- Re: A patch for enforcing double-width CJK character display, 黄建忠, 2012/04/17
- Re: A patch for enforcing double-width CJK character display, Werner LEMBERG, 2012/04/17
- Re: A patch for enforcing double-width CJK character display, James Cloos, 2012/04/17
- Re: A patch for enforcing double-width CJK character display, 黄建忠, 2012/04/17
- Re: A patch for enforcing double-width CJK character display, 黄建忠, 2012/04/16
- Re: A patch for enforcing double-width CJK character display, Kenichi Handa, 2012/04/18
- Re: A patch for enforcing double-width CJK character display, 黄建忠, 2012/04/18
- Re: A patch for enforcing double-width CJK character display, Miles Bader, 2012/04/18
- Re: A patch for enforcing double-width CJK character display,
黄建忠 <=