From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: [Bug] Unusual wide Chinese fonts on w32 (again) Date: Tue, 25 Oct 2005 22:19:26 +0100 Message-ID: References: <5065e2900510201859s16a6b3el@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130275302 31277 80.91.229.2 (25 Oct 2005 21:21:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Oct 2005 21:21:42 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 25 23:21:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EUWEJ-0004IQ-1T for ged-emacs-devel@m.gmane.org; Tue, 25 Oct 2005 23:21:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUWEI-0005IO-ED for ged-emacs-devel@m.gmane.org; Tue, 25 Oct 2005 17:21:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EUWE9-0005HI-Aw for emacs-devel@gnu.org; Tue, 25 Oct 2005 17:21:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EUWE7-0005H0-Ua for emacs-devel@gnu.org; Tue, 25 Oct 2005 17:21:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUWE7-0005Gw-QV for emacs-devel@gnu.org; Tue, 25 Oct 2005 17:20:59 -0400 Original-Received: from [194.106.33.237] (helo=outmail.freedom2surf.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EUWE7-0004HK-Lr for emacs-devel@gnu.org; Tue, 25 Oct 2005 17:20:59 -0400 Original-Received: from wanchan.jasonrumney.net (i-83-67-23-108.freedom2surf.net [83.67.23.108]) by outmail.freedom2surf.net (8.12.10/8.12.10) with ESMTP id j9PLKsch002174; Tue, 25 Oct 2005 22:20:54 +0100 Original-Received: from TONKOTSU-RAMEN (tonkotsu-ramen.jasonrumney.net [10.0.0.28]) by wanchan.jasonrumney.net (Postfix) with ESMTP id 19223423; Tue, 25 Oct 2005 22:20:54 +0100 (BST) Original-To: Sun Yijiang In-Reply-To: <5065e2900510201859s16a6b3el@mail.gmail.com> (Sun Yijiang's message of "Fri, 21 Oct 2005 09:59:48 +0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44865 Archived-At: Sun Yijiang writes: > I wonder why this has not been fixed yet, maybe he cannot make tests on his > computer? It's easy to verify: use `create-fontset-from-fontset-spec' to > assign a font for chinese-gb2312 and you can see all Chinese chars is 4 > times wide of ascii chars. I have made a change that fixes this bug. There is still a problem if create-fontset-from-ascii-font is used with a font with double-width characters and font-lock is enabled. I think the problem is limited to Windows because on X always uses separate fonts for different encodings, but it appears that FONT_WIDTH, FONT_AVERAGE_WIDTH and the actual character metrics are still not used in a consistent way throughout the code.