emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with chinese gbk fonts on w32


From: Sun Yijiang
Subject: Re: Problem with chinese gbk fonts on w32
Date: Tue, 6 Sep 2005 16:13:06 +0800

I think I did not describe the problem properly. The problem is:
1) Only on W32 platform.
2) Has nothing to do with GBK. The problem arises together with create-fontset-from-fontset-spec, no matter I use GBK or GB2312.

The patch works indeed. In fact, "font->tm.tmMaxCharWidth" is double of "font->tm.tmAveCharWidth", I think that's where the problem is.

2005/9/6, Jason Rumney <address@hidden>:
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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]