unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: 黄建忠 <jianzhong.huang@i-soft.com.cn>
To: Miles Bader <miles@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	kanru@kanru.info, emacs-devel@gnu.org
Subject: Re: A patch for enforcing double-width CJK character display
Date: Sun, 15 Apr 2012 21:27:56 +0800	[thread overview]
Message-ID: <4F8ACCDC.4070103@i-soft.com.cn> (raw)
In-Reply-To: <87d379h971.fsf@catnip.gol.com>

[-- Attachment #1: Type: text/plain, Size: 3053 bytes --]

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 <monnier@iro.umontreal.ca> 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


[-- Attachment #2: smallfont.png --]
[-- Type: image/png, Size: 90693 bytes --]

[-- Attachment #3: smallest.png --]
[-- Type: image/png, Size: 60666 bytes --]

  reply	other threads:[~2012-04-15 13:27 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4F85A138.6090900@i-soft.com.cn>
2012-04-11 15:48 ` A patch for enforcing double-width CJK character display Kan-Ru Chen
2012-04-11 16:16   ` 黄建忠
2012-04-12  8:56     ` 黄建忠
2012-04-12  9:53       ` Eli Zaretskii
2012-04-12 11:18         ` 黄建忠
2012-04-12 14:27           ` Eli Zaretskii
2012-04-12 17:56             ` 黄建忠
2012-04-12 20:33               ` Stefan Monnier
     [not found]                 ` <4F8782C8.2030005@i-soft.com.cn>
2012-04-13 11:42                   ` 黄建忠
2012-04-13 12:03                     ` 黄建忠
2012-04-13 13:27                   ` Stefan Monnier
2012-04-15  5:10                     ` Miles Bader
2012-04-15 13:27                       ` 黄建忠 [this message]
2012-04-15 16:08                       ` William Xu
2012-04-15 22:19                         ` Miles Bader
2012-04-16  0:51                           ` 黄建忠
2012-04-16  5:27                             ` Miles Bader
2012-04-16  5:40                               ` 黄建忠
2012-04-16  6:37                                 ` 黄建忠
2012-04-16  9:21                                   ` 黄建忠
2012-04-17  2:16                                     ` 黄建忠
2012-04-17  0:13                                   ` Miles Bader
2012-04-17  0:39                                     ` Miles Bader
2012-04-17  2:00                                       ` 黄建忠
2012-04-17  2:30                                         ` Miles Bader
2012-04-17  3:00                                           ` 黄建忠
2012-04-17  4:08                                             ` Miles Bader
2012-04-17  4:56                                               ` Werner LEMBERG
2012-04-17  5:02                                                 ` 黄建忠
2012-04-17  6:33                                                   ` Miles Bader
2012-04-17  7:03                                                   ` Werner LEMBERG
2012-04-17  5:52                                                 ` Miles Bader
2012-04-17  6:10                                                   ` 黄建忠
2012-04-17  7:02                                                     ` Miles Bader
2012-04-17  8:06                                                       ` Werner LEMBERG
2012-04-17  8:25                                                         ` Miles Bader
2012-04-17  9:06                                                           ` Werner LEMBERG
2012-04-17  8:51                                                       ` 黄建忠
2012-04-17  6:45                                                   ` Werner LEMBERG
2012-04-17  9:07                                       ` James Cloos
2012-04-17  9:27                                         ` 黄建忠
2012-04-17  1:47                                     ` 黄建忠
2012-04-18  6:54                               ` Kenichi Handa
2012-04-18  8:13                                 ` 黄建忠
2012-04-18 13:58                                 ` Miles Bader
2014-04-28  5:35 JunJie Nan
2014-04-29  5:39 ` Stefan Monnier
2014-04-29  6:36   ` Jan D.
2014-04-29  8:16   ` Thien-Thi Nguyen
2014-04-29 20:41 ` Liang Wang
  -- strict thread matches above, loose matches on Subject: below --
2014-04-30  2:00 Hui Liu
2014-04-30 17:08 ` Liang Wang
2014-10-04  3:26 Feng Shu

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=4F8ACCDC.4070103@i-soft.com.cn \
    --to=jianzhong.huang@i-soft.com.cn \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kanru@kanru.info \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).