From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Miles Bader <miles@gnu.org>
Newsgroups: gmane.emacs.devel
Subject: Re: A patch for enforcing double-width CJK character display
Date: Tue, 17 Apr 2012 13:08:49 +0900
Message-ID: <87wr5fdmpa.fsf@catnip.gol.com>
References: <4F85A138.6090900@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>
	<jwvehrspu5f.fsf-monnier+emacs@gnu.org>
	<4F8782C8.2030005@i-soft.com.cn>
	<jwvwr5j4vbr.fsf-monnier+emacs@gnu.org>
	<87d379h971.fsf@catnip.gol.com> <m27gxhm0za.fsf@gmail.com>
	<877gxghc3d.fsf@catnip.gol.com> <4F8B6D0F.2050700@i-soft.com.cn>
	<buohawk9rg3.fsf@dhlpc061.dev.necel.com>
	<4F8BB0D3.6060202@i-soft.com.cn> <4F8BBE1F.9080701@i-soft.com.cn>
	<87sjg3kygc.fsf@catnip.gol.com> <873983kx7u.fsf@catnip.gol.com>
	<4F8CCEB2.4060001@i-soft.com.cn> <87ipgzjdir.fsf@catnip.gol.com>
	<4F8CDCE1.8030109@i-soft.com.cn>
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Trace: dough.gmane.org 1334635745 11746 80.91.229.3 (17 Apr 2012 04:09:05 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Tue, 17 Apr 2012 04:09:05 +0000 (UTC)
Cc: emacs-devel@gnu.org
To: =?utf-8?B?6buE5bu65b+g?= <jianzhong.huang@i-soft.com.cn>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 17 06:09:04 2012
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1SJziy-0007ha-BY
	for ged-emacs-devel@m.gmane.org; Tue, 17 Apr 2012 06:09:04 +0200
Original-Received: from localhost ([::1]:46111 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1SJzix-000708-KA
	for ged-emacs-devel@m.gmane.org; Tue, 17 Apr 2012 00:09:03 -0400
Original-Received: from eggs.gnu.org ([208.118.235.92]:60671)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1SJzis-0006zz-86
	for emacs-devel@gnu.org; Tue, 17 Apr 2012 00:09:01 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <miles@gnu.org>) id 1SJzio-0007gx-0z
	for emacs-devel@gnu.org; Tue, 17 Apr 2012 00:08:57 -0400
Original-Received: from smtp12.dentaku.gol.com ([203.216.5.74]:39093)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <miles@gnu.org>)
	id 1SJzin-0007go-Ni; Tue, 17 Apr 2012 00:08:53 -0400
Original-Received: from 61.245.22.233.eo.eaccess.ne.jp ([61.245.22.233]
	helo=catnip.gol.com) by smtp12.dentaku.gol.com with esmtpa (Dentaku)
	(envelope-from <miles@gnu.org>)
	id 1SJzik-000213-CR; Tue, 17 Apr 2012 13:08:50 +0900
Original-Received: by catnip.gol.com (Postfix, from userid 1000)
	id 8A211DFC1; Tue, 17 Apr 2012 13:08:49 +0900 (JST)
System-Type: x86_64-unknown-linux-gnu
In-Reply-To: <4F8CDCE1.8030109@i-soft.com.cn> (=?utf-8?B?Ium7hOW7uuW/oCIn?=
	=?utf-8?B?cw==?= message of "Tue, 17 Apr 2012 11:00:49 +0800")
Original-Lines: 48
X-Virus-Scanned: ClamAV GOL (outbound)
X-Abuse-Complaints: abuse@gol.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 203.216.5.74
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
	<mailto:emacs-devel-request@gnu.org?subject=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:149715
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/149715>

=E9=BB=84=E5=BB=BA=E5=BF=A0 <jianzhong.huang@i-soft.com.cn> writes:
>>> So I'm wondering how you get the pixelsize of fonts?
>> I used "xzoom" to magnify the display, and counted the pixels... :]
>
> Wow :-D
> But a wrong way to get pixelsize:-(
>
> You have a very BIG BIG BIG misunderstanding of "glyph pixelsize".

That's silly.

It doesn't _matter_ what some definition says somewhere.

In the end, what _actually matters_ is how the characters are
displayed -- and the best way to judge how they are displayed is to
_look at the display_.

[The pixel counts I gave, BTW are actually "advance counts" -- the
number of pixels between the left edge of one character and the left
edge of the next character.]

So the point is that the numbers I have should be accurate in
terms of how the characters are actually displayed.

To reiterate:

 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.

 2) So, if you force the CJK characters to fit 2 * ASCII width, then
    you obviously need to add (180 - 120) =3D 60 pixels of extra space
    to those 10 CJK characters.

 3) That's 6 extra pixels of whitespace (in addition to existing
    whitespace) per CJK character.

 4) Since each CJK character is 12-pixels wide, that increases the
    character advance spacing by 50%...

Anyway, I'll try your patch, and see how it looks in reality.

Thanks,

-miles

--=20
Zeal, n. A certain nervous disorder afflicting the young and inexperienced.