From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?6buE5bu65b+g?= Newsgroups: gmane.emacs.devel Subject: Re: A patch for enforcing double-width CJK character display Date: Mon, 16 Apr 2012 13:40:35 +0800 Message-ID: <4F8BB0D3.6060202@i-soft.com.cn> References: <4F85A138.6090900@i-soft.com.cn> <87vcl646c7.fsf@isil.kanru.info> <4F85AE69.9050002@i-soft.com.cn> <4F8698B0.2030703@i-soft.com.cn> <83hawp46p7.fsf@gnu.org> <4F86BA0F.4080301@i-soft.com.cn> <83ehrt3u0p.fsf@gnu.org> <4F87173F.3070801@i-soft.com.cn> <4F8782C8.2030005@i-soft.com.cn> <87d379h971.fsf@catnip.gol.com> <877gxghc3d.fsf@catnip.gol.com> <4F8B6D0F.2050700@i-soft.com.cn> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------040906050507030708070801" X-Trace: dough.gmane.org 1334554864 30610 80.91.229.3 (16 Apr 2012 05:41:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2012 05:41:04 +0000 (UTC) Cc: William Xu , emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 16 07:41:03 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SJegR-0000P2-7a for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2012 07:41:03 +0200 Original-Received: from localhost ([::1]:50632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJegQ-0007GT-CM for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2012 01:41:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJegM-0007GO-OA for emacs-devel@gnu.org; Mon, 16 Apr 2012 01:41:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJegK-00089J-DC for emacs-devel@gnu.org; Mon, 16 Apr 2012 01:40:58 -0400 Original-Received: from mta319.sina.net ([202.108.3.196]:50623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJegJ-00088T-Et; Mon, 16 Apr 2012 01:40:56 -0400 X-Originating-IP: [218.240.45.242] Original-Received: from unknown (HELO mta319.sina.net) ([10.54.5.29]) by irxd5-207.sina.net with ESMTP; 16 Apr 2012 13:40:47 +0800 Original-Received: by smtp-5-29.sina.net (SINAMAIL, from userid 1040) id 13E183028D3; Mon, 16 Apr 2012 13:40:48 +0800 (CST) Original-Received: from piggy.pure64.org (unknown [218.240.45.242]) by smtp-5-29.sina.net (SINAMAIL) with ESMTPA id B42953028EA; Mon, 16 Apr 2012 13:40:46 +0800 (CST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120327 Thunderbird/10.0.2 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.108.3.196 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149685 Archived-At: This is a multi-part message in MIME format. --------------040906050507030708070801 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Got it, I will try this font. by the way, You can add a line to your .emacs. (set-fontset-font "fontset-default" 'han "FONTFAMILY FONTSIZE" ) replace "FONTFAMILY" and FONTSIZE according to your environment. And FONTSIZE can be ignored if you had no need to specify a size for this font. 于 2012年04月16日 13:27, Miles Bader 写道: > 黄建忠 writes: >> Would you please provide some example characters and such a font to >> help us make it better? > Here's an example from my (Debian) system; the font I chose in Emacs > is "Droid Sans Mono"; the "x11 size" is 13 [which isn't exactly the > size chosen in the UI; fontconfig sizes and X font sizes seem to be > only loosely related... :( ] > > I set the font to "Droid Sans Mono", and the Japanese font Emacs > automatically chose was "きろ字". I don't know _why_ Emacs chose that > font, as other apps don't seem to -- If I select Droid S M in GTK > apps, for instance, they use something much better looking, probably > "Droid Fallback" (which is a matching font for Droid S M). > > I've attached an image file showing what this looks like on my > computer. > > The things I notice: > > (1) The font chosen by Emacs for Japanese might be a bit odd, and > doesn't seem to match what other apps choose. > > (2) The "きろ字" font is already pretty widely spaced, maybe near > the limit of readability IMO. > > (3) It looks like forcing CJK alignment to 2*ASCII will increase the > width of characters in this font by about 30%. Given the already > very wide spacing, I think the result might look funny. > > [ (4) If I grow or shrink the font-size, the ASCII and Japanese grow > by different, and varying amounts (that is, there are obvious > "jumps" in the size increases, and the jumps occur at different > places for the ASCII font and the Japanese font); my guess is that > this is probably due to rounding by the font renderer. So there > will be. ] > > Now that I think about it, I'd say that the problem seems to lie more > with Emacs' choice of fonts for Japanese (both the funny automatic > choice, and the lack of good methods for users to tweak it). > > Thanks, > > -Miles > > > -- Huang JianZhong --------------040906050507030708070801 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Got it, I will try this font.

by the way, You can add a line to your .emacs.
(set-fontset-font "fontset-default" 'han "FONTFAMILY FONTSIZE" )
replace "FONTFAMILY" and FONTSIZE according to your environment.
And FONTSIZE can be ignored if you had no need to specify a size for this font.

于 2012年04月16日 13:27, Miles Bader 写道:
黄建忠 <jianzhong.huang@i-soft.com.cn> writes:
Would you please provide some example characters and such a font to
help us make it better?
Here's an example from my (Debian) system; the font I chose in Emacs
is "Droid Sans Mono"; the "x11 size" is 13 [which isn't exactly the
size chosen in the UI; fontconfig sizes and X font sizes seem to be
only loosely related... :( ]

I set the font to "Droid Sans Mono", and the Japanese font Emacs
automatically chose was "きろ字".  I don't know _why_ Emacs chose that
font, as other apps don't seem to -- If I select Droid S M in GTK
apps, for instance, they use something much better looking, probably
"Droid Fallback" (which is a matching font for Droid S M).

I've attached an image file showing what this looks like on my
computer.

The things I notice:

  (1) The font chosen by Emacs for Japanese might be a bit odd, and
  doesn't seem to match what other apps choose.

  (2) The "きろ字" font is already pretty widely spaced, maybe near
  the limit of readability IMO.

  (3) It looks like forcing CJK alignment to 2*ASCII will increase the
  width of characters in this font by about 30%.  Given the already
  very wide spacing, I think the result might look funny.

  [ (4) If I grow or shrink the font-size, the ASCII and Japanese grow
  by different, and varying amounts (that is, there are obvious
  "jumps" in the size increases, and the jumps occur at different
  places for the ASCII font and the Japanese font); my guess is that
  this is probably due to rounding by the font renderer.  So there
  will be. ]

Now that I think about it, I'd say that the problem seems to lie more
with Emacs' choice of fonts for Japanese (both the funny automatic
choice, and the lack of good methods for users to tweak it).

Thanks,

-Miles




    


-- 
Huang JianZhong
--------------040906050507030708070801--