From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Kevin Yu" Newsgroups: gmane.emacs.devel Subject: Re: Ntemacs chooses wrong font. Date: Wed, 11 Jun 2008 20:05:54 +0800 Message-ID: <42b562540806110505t4ee63fecxa8f229d8c4ecd1ad@mail.gmail.com> References: <42b562540806060552q622e3dfvb35820ec28dc66d3@mail.gmail.com> <4849AAE4.4080404@gnu.org> <42b562540806061941p2c2d2ebfg734c2d7c4afbbd28@mail.gmail.com> <484F8E81.8050604@gnu.org> <42b562540806110351p699e4ad8l19b5841724eef431@mail.gmail.com> <484FB69F.2060200@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3533_15638023.1213185954244" X-Trace: ger.gmane.org 1213185973 14542 80.91.229.12 (11 Jun 2008 12:06:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Jun 2008 12:06:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Jason Rumney" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 11 14:06:56 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K6P6L-0001E7-LP for ged-emacs-devel@m.gmane.org; Wed, 11 Jun 2008 14:06:54 +0200 Original-Received: from localhost ([127.0.0.1]:50592 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6P5Y-0000Ky-1B for ged-emacs-devel@m.gmane.org; Wed, 11 Jun 2008 08:06:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6P5T-0000J0-4c for emacs-devel@gnu.org; Wed, 11 Jun 2008 08:05:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6P5R-0000GY-2H for emacs-devel@gnu.org; Wed, 11 Jun 2008 08:05:58 -0400 Original-Received: from [199.232.76.173] (port=56933 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6P5Q-0000GQ-Td for emacs-devel@gnu.org; Wed, 11 Jun 2008 08:05:56 -0400 Original-Received: from ti-out-0910.google.com ([209.85.142.184]:58240) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K6P5Q-0005B8-0Y for emacs-devel@gnu.org; Wed, 11 Jun 2008 08:05:56 -0400 Original-Received: by ti-out-0910.google.com with SMTP id u5so851053tia.10 for ; Wed, 11 Jun 2008 05:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=Zb8P47ntExxFx2O3Zx9H93xEkvFjS4zdfXt64ediWZg=; b=pckDpEW+h0Wyjpbz+NaCd4oCtxt5UHcZXsusiBYtzU5ZnScHgnDTuxpoCRq6M3de/A uA9+M0UKt4lfEMxrOJ13GgSgZOIqXm/tYqaWKe4HsN4YRb59tFc0eX5C1+vnCWMq4KGU STVPPVOnPbtV7U9BQ4F7PQzljesTzJqwGuQYM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=Irv6Wj7hmdN8k7HaYFb+lzBRO3q8RkHhrHd91HnNiCoZoG70QaeuyTLUkhymkGoo/n dEOo38GitoRkzXEyc1cm7W9mbAM8j2zs9QUAvCOyHcHfe3rtldEykwGOeHxB2rCsnzKs og2RWRABupVlMJRGjUUVyaAAvahrAEDKpQgDc= Original-Received: by 10.110.49.6 with SMTP id w6mr1395040tiw.6.1213185954250; Wed, 11 Jun 2008 05:05:54 -0700 (PDT) Original-Received: by 10.110.5.9 with HTTP; Wed, 11 Jun 2008 05:05:54 -0700 (PDT) In-Reply-To: <484FB69F.2060200@gnu.org> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:98943 Archived-At: ------=_Part_3533_15638023.1213185954244 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline If I change font configuration to: (set-frame-font "Monaco-10") (set-fontset-font (frame-parameter nil 'font) 'han (font-spec :family "Microsoft Yahei" :size 16)) (set-fontset-font (frame-parameter nil 'font) 'symbol (font-spec :family "Microsoft Yahei" :size 16)) (set-fontset-font (frame-parameter nil 'font) 'cjk-misc (font-spec :family "Microsoft Yahei" :size 16)) (set-fontset-font (frame-parameter nil 'font) 'bopomofo (font-spec :family "Microsoft Yahei" :size 16)) Emacs will use the right Chinese font. On Wed, Jun 11, 2008 at 7:27 PM, Jason Rumney wrote: > Kevin Yu wrote: > > Here's my font related configuration > > > > (set-language-environment "chinese-gb18030") > > (set-frame-font "Monaco-10") > > (set-fontset-font (frame-parameter nil 'font) > > 'han '("Microsoft Yahei"."unicode-bmp")) > > (set-fontset-font (frame-parameter nil 'font) > > 'symbol '("Microsoft Yahei"."unicode-bmp")) > > (set-fontset-font (frame-parameter nil 'font) > > 'cjk-misc '("Microsoft Yahei"."unicode-bmp")) > > (set-fontset-font (frame-parameter nil 'font) > > 'bopomofo '("Microsoft Yahei"."unicode-bmp")) > > Thanks, I can reproduce the original problem with these settings. > > For the other problem (a different font being used even when Chinese > characters display), you may need to use the localized font name of > Microsoft Yahei. Maybe the following will tell you what that is, as I > expect that Windows recognizes the ASCII names for fonts even if it > outputs the localized name. > > (list-fonts (font-spec :family "Microsoft Yahei")) > > > ------=_Part_3533_15638023.1213185954244 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline If I change font configuration to:
(set-frame-font "Monaco-10")
(set-fontset-font (frame-parameter nil 'font)
          'han (font-spec :family "Microsoft Yahei" :size 16))
(set-fontset-font (frame-parameter nil 'font)
          'symbol (font-spec :family "Microsoft Yahei" :size 16))
(set-fontset-font (frame-parameter nil 'font)
          'cjk-misc (font-spec :family "Microsoft Yahei" :size 16))
(set-fontset-font (frame-parameter nil 'font)
          'bopomofo (font-spec :family "Microsoft Yahei" :size 16))

Emacs will use the right Chinese font.

On Wed, Jun 11, 2008 at 7:27 PM, Jason Rumney <jasonr@gnu.org> wrote:
Kevin Yu wrote:
> Here's my font related configuration
>
> (set-language-environment "chinese-gb18030")
> (set-frame-font "Monaco-10")
> (set-fontset-font (frame-parameter nil 'font)
> 'han '("Microsoft Yahei"."unicode-bmp"))
> (set-fontset-font (frame-parameter nil 'font)
> 'symbol '("Microsoft Yahei"."unicode-bmp"))
> (set-fontset-font (frame-parameter nil 'font)
> 'cjk-misc '("Microsoft Yahei"."unicode-bmp"))
> (set-fontset-font (frame-parameter nil 'font)
> 'bopomofo '("Microsoft Yahei"."unicode-bmp"))

Thanks, I can reproduce the original problem with these settings.

For the other problem (a different font being used even when Chinese
characters display), you may need to use the localized font name of
Microsoft Yahei. Maybe the following will tell you what that is, as I
expect that Windows recognizes the ASCII names for fonts even if it
outputs the localized name.

(list-fonts (font-spec :family "Microsoft Yahei"))



------=_Part_3533_15638023.1213185954244--