0

I specified the font using:

(set-face-attribute 'default nil :font "Inziu Iosevka SC")

The expected result is (in notepad.exe):

enter image description here

But the result in Emacs is actually:

enter image description here

Only , and are displayed as specified.

The result of describe-char on the correctly rendered char is:


             position: 374 of 386 (97%), column: 0
            character: 举 (displayed as 举) (codepoint 20030, #o47076, #x4e3e)
    preferred charset: chinese-gbk (GBK Chinese simplified.)
code point in charset: 0xBED9
               script: han
               syntax: w    which means: word
             category: .:Base, C:2-byte han, L:Left-to-right (strong), c:Chinese, |:line breakable
             to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
          buffer code: #xE4 #xB8 #xBE
            file code: #xBE #xD9 (encoded by coding system chinese-gbk-dos)
              display: by this font (glyph code)
    uniscribe:-outline-Inziu Iosevka SC-normal-normal-normal-mono-19-*-*-*-c-*-iso10646-1 (#x2493)

Character code properties: customize what to show
  name: CJK IDEOGRAPH-4E3E
  general-category: Lo (Letter, Other)
  decomposition: (20030) ('举')

There are text properties here:
  fontified            t

The result of descirbe-char on wrongly rendered char is:


             position: 360 of 386 (93%), column: 0
            character: 床 (displayed as 床) (codepoint 24202, #o57212, #x5e8a)
    preferred charset: chinese-gbk (GBK Chinese simplified.)
code point in charset: 0xB4B2
               script: han
               syntax: w    which means: word
             category: .:Base, C:2-byte han, L:Left-to-right (strong), c:Chinese, h:Korean, j:Japanese, |:line breakable
             to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
          buffer code: #xE5 #xBA #x8A
            file code: #xB4 #xB2 (encoded by coding system chinese-gbk-dos)
              display: by this font (glyph code)
    uniscribe:-outline-BatangChe-normal-normal-normal-mono-19-*-*-*-c-*-gb2312.1980-0 (#x82AA)

Character code properties: customize what to show
  name: CJK IDEOGRAPH-5E8A
  general-category: Lo (Letter, Other)
  decomposition: (24202) ('床')

There are text properties here:
  fontified            t

So, how to solve this problem?

  • 1
    Not sure if you want to set global default font or only a font for chinese-gbk charset or han script, but maybe try (set-fontset-font "fontset-default" 'chinese-gbk "Inziu Iosevka SC") or (set-fontset-font "fontset-default" 'han "Inziu Iosevka SC"). You could also replace "fontset-default" with "fontset-standard" or t, but that depends on your needs. Check fontset docs gnu.org/software/emacs/manual/html_node/emacs/Fontsets.html for more info. – kmicu Oct 5 '15 at 15:54
1

Well, I'm not an expert, but can share you my configuration about Chinese font.

 (dolist (charset '(kana han symbol cjk-misc bopomofo))

            (set-fontset-font (frame-parameter nil 'font)

                               charset

                              (font-spec :family "FangSong" :size 15)))

Try this in your .emacs, see if any better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.