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: Problem with chinese gbk fonts on w32 Date: Tue, 06 Sep 2005 09:00:34 +0100 Message-ID: <431D4CA2.9080201@gnu.org> References: <5065e29005073119317520578d@mail.gmail.com> <5065e29005080101382635f42d@mail.gmail.com> <5065e2900509060043650bbe97@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1125996907 20666 80.91.229.2 (6 Sep 2005 08:55:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2005 08:55:07 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 06 10:55:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ECZCu-00012s-In for ged-emacs-devel@m.gmane.org; Tue, 06 Sep 2005 10:53:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ECZHO-0007s4-Cw for ged-emacs-devel@m.gmane.org; Tue, 06 Sep 2005 04:58:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ECYwW-0007zz-BN for emacs-devel@gnu.org; Tue, 06 Sep 2005 04:36:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ECYu8-0007mj-1m for emacs-devel@gnu.org; Tue, 06 Sep 2005 04:35:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ECYrE-0006tW-Fv for emacs-devel@gnu.org; Tue, 06 Sep 2005 04:31:09 -0400 Original-Received: from [217.207.198.106] (helo=exchange.integrasp.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ECYT6-000821-Bg for emacs-devel@gnu.org; Tue, 06 Sep 2005 04:06:12 -0400 Original-Received: from ASSP-nospam (localhost [127.0.0.1]) by exchange.integrasp.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id RFBH78JV; Tue, 6 Sep 2005 08:58:38 +0100 Original-Received: from 83.67.23.108 ([83.67.23.108] helo=[10.0.0.28]) by ASSP-nospam ; 6 Sep 05 07:58:38 -0000 User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en Original-To: Sun Yijiang In-Reply-To: <5065e2900509060043650bbe97@mail.gmail.com> 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:42649 Archived-At: Sun Yijiang wrote: > I think I've found the problem, here is the patch of w32fns.c (against > revision 1.256). I don't know the detail, but this patch works. > > --------------------------------------8<-------------------------------------- > --- w32fns.c 2005-08-08 09:45:47.000000000 +0800 > +++ w32fns-fix.c 2005-09-06 15:32:01.275812264 +0800 > @@ -4545,7 +4545,7 @@ > /* Fill out details in lf according to the font that was > actually loaded. */ > lf.lfHeight = font->tm.tmInternalLeading - font->tm.tmHeight; > - lf.lfWidth = font->tm.tmMaxCharWidth; > + lf.lfWidth = font->tm.tmAveCharWidth; > lf.lfWeight = font->tm.tmWeight; > lf.lfItalic = font->tm.tmItalic; > lf.lfCharSet = font->tm.tmCharSet; > --------------------------------------8<-------------------------------------- How can this work? The problem you reported was for BDF fonts used to display the GBK character sets. The fix above affects only Windows system fonts.