[Top][All Lists]

[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 15:43:14 +0800

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.

--- 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;

2005/8/1, Sun Yijiang <address@hidden>:
Sorry, I've reviewed my .emacs and found where the problem is. The
problem is NOT mule-gbk, it's "create-fontset-from-fontset-spec".
Following setting results in double-width Chinese characters:

"-*-bitstream vera sans mono-normal-r-*-*-14-*-*-*-c-*-fontset-gbk,
chinese-cns11643-7:-*-simsun-normal-r-normal-*-16-*-*-p-*-gbk*-*" t)

I think the problem is that I set different fonts for each char set. If
I comment out this setting and still use mule-gbk, Chinese characters
looks OK. If I use this setting, the Chinese characters looks
double-width, either with or without mule-gbk. This setting works for
previous CVS Emacs builds and seems to become "bad" recently.

I remember this problem first appeared with a check in of w32bdf.c
early this year. The problem can be resolved by rolling back w32bdf.c
to revision 1.20 at that time. But now even this rolling back does not
work, maybe other changes affects this problem.

2005/8/1, Jason Rumney <address@hidden>:
Sun Yijiang <address@hidden> writes:

> I think this change is probably not fully tested. When I use the
> mule-gbk package and set font for chinese characters, they look so
> wide, but when I use "emacs -q" they look nice, make no difference
> with previous CVS Emacs. I roll back the src/w32bdf.c to older
> version, and everything is OK. I think the change of w32bdf.c should
> be reviewed, since this is really a bug.

You seem to be saying that you only see the "bug" when you load
mule-gbk, which is not part of Emacs. What does mule-gbk do? Does it
perhaps try to work around the previous bug by doubling the width of
Chinese characters?

reply via email to

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