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: Tue, 17 Apr 2012 10:00:18 +0800 Message-ID: <4F8CCEB2.4060001@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> <4F8BB0D3.6060202@i-soft.com.cn> <4F8BBE1F.9080701@i-soft.com.cn> <87sjg3kygc.fsf@catnip.gol.com> <873983kx7u.fsf@catnip.gol.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1334628038 31547 80.91.229.3 (17 Apr 2012 02:00:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Apr 2012 02:00:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 17 04:00:36 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 1SJxid-0007lT-Vq for ged-emacs-devel@m.gmane.org; Tue, 17 Apr 2012 04:00:36 +0200 Original-Received: from localhost ([::1]:32992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJxid-0001d1-Fv for ged-emacs-devel@m.gmane.org; Mon, 16 Apr 2012 22:00:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJxia-0001cv-Sa for emacs-devel@gnu.org; Mon, 16 Apr 2012 22:00:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJxiZ-0001sf-43 for emacs-devel@gnu.org; Mon, 16 Apr 2012 22:00:32 -0400 Original-Received: from mta319.sina.net ([202.108.3.135]:58330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJxiY-0001nF-D7; Mon, 16 Apr 2012 22:00:31 -0400 X-Originating-IP: [218.240.45.242] Original-Received: from unknown (HELO mta319.sina.net) ([10.54.5.43]) by irxd5-206.sina.net with ESMTP; 17 Apr 2012 10:00:24 +0800 Original-Received: by smtp-5-43.sina.net (SINAMAIL, from userid 1036) id F31BC14209D; Tue, 17 Apr 2012 10:00:24 +0800 (CST) Original-Received: from piggy.pure64.org (unknown [218.240.45.242]) by smtp-5-43.sina.net (SINAMAIL) with ESMTPA id CB8C2142051; Tue, 17 Apr 2012 10:00:24 +0800 (CST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120327 Thunderbird/10.0.2 In-Reply-To: <873983kx7u.fsf@catnip.gol.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.108.3.135 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:149711 Archived-At: 于 2012年04月17日 08:39, Miles Bader 写道: >> case 1: size = 13 >> ASCII: Lucida Sans Typewriter [9 pix per char] >> CJK: さざなみ明朝 [12 pix per char] >> >> case 2: size = 11 >> ASCII: Lucida Sans Typewriter [7 pix per char] >> CJK: さざなみ明朝 [10 pix per char] 1, If you use Sans font as default font, the patch will just ignore it and never adjust the width padding , since it is wrong setting. 2, For Sans font, it's variable pitch, every glyph in the font is different width. The C-u C-x = report a font spec string. Looks like: xft:-unknown-Monaco-normal-normal-normal-*-17-*-*-*-m-0-iso10646-1 (#x4B) Note the "17" here is FONT_PIXEL_SIZE from FcPattern of fontconfig, not Font Size in common sense, It should be same for CJK font and English font. So Im wondering how you get the pixelsize of fonts? > p.s. "size" here is what Emacs "C-u C-x =" reports, which is _not_ the > same as the sizes used in the Emacs font dialog... [kinda annoying, > that...] > > -miles > -- Huang JianZhong