2008/6/11 Jason Rumney <
address@hidden>:
Kevin Yu wrote:
> character: 实 (23454, #o55636, #x5b9e)
> preferred charset: gb18030 (GB18030)
> code point: 0xCAB5
> syntax: w which means: word
> category: C:Chinese (Han) characters of 2-byte character sets c:Chinese
> |:While filling, we can break a line at this character.
> buffer code: #xE5 #xAE #x9E
> file code: #xCA #xB5 (encoded by coding system chinese-gb18030-unix)
> display: by this font (glyph code)
> -outline- -normal-normal-normal-mono-13-*-*-*-c-*-gb2312.1980-0 (#x1172)
>
> Emacs displays the font family name as:"\320\302\313\316\314\345"
This is a bug, but it should at least be consistent, as there is no
encoding in either direction.
> those octal bytes represent for "新宋体", in fact it isn't the font I
> tell emacs to choose for Chinese characters.
How do you tell Emacs which font to use for Chinese characters?
I am trying to reproduce the scenario here so I can see what is going wrong.
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"))
> By the way, in the elisp manual, all localized strings are showed as
> octal bytes, Here's an example:
I don't see any localized strings in the elisp manual. Perhaps that is a
problem with the version of makeinfo that you use to build them. It is
not related to the font names, anyway.
> > -outline-Monaco-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1
> (#x03)
>
What does the following report if you press C-x C-e at the end of the line?
(insert (prin1-to-string (list-fonts (font-spec :family "Monaco"
:registry "iso8859-1"))))
(#<font-entity uniscribe outline Monaco mono iso8859-1 normal normal normal 0 nil 110 nil ((:format . truetype) (:script latin))> #<font-entity gdi outline Monaco mono iso8859-1 normal normal normal 0 nil 110 nil ((:format . truetype) (:script latin))>)