all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sun Yijiang <sunyijiang@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Problem with chinese gbk fonts on w32
Date: Tue, 6 Sep 2005 16:13:06 +0800	[thread overview]
Message-ID: <5065e29005090601131862788e@mail.gmail.com> (raw)
In-Reply-To: <431D4CA2.9080201@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 1442 bytes --]

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 <jasonr@gnu.org>:
> 
> 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.
> 
>

[-- Attachment #1.2: Type: text/html, Size: 2306 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

      reply	other threads:[~2005-09-06  8:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-01  2:31 Problem with chinese gbk fonts on w32 Sun Yijiang
2005-08-01  7:08 ` Jason Rumney
2005-08-01  8:38   ` Sun Yijiang
2005-09-06  7:43     ` Sun Yijiang
2005-09-06  8:00       ` Jason Rumney
2005-09-06  8:13         ` Sun Yijiang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5065e29005090601131862788e@mail.gmail.com \
    --to=sunyijiang@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.