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.
Kevin Yu wrote:Thanks, I can reproduce the original problem with these settings.
> 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"))
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"))