It has been the biggest headache to configure Linux desktop environment to display sharp Chinese glyphs. Personally, I would rather trace the segmentation errors rather than setup the Chinese font. For years, I was satisfied with the bottom line, i.e to browse the Chinese web page using Firefox, input Chinese when necessary.

It is quite embarrassing to stick to the ugly Chinese display as a geek, I would summarize my efforts to configure the Chinese fonts.

Get Chinese TrueType font

Copy simsun.ttc from Microsoft Windows system, put somewhere, for example, /usr/share/fonts/ttf.

cp simsun.ttc /usr/share/fonts/ttf/simsun.ttf  
cd /usr/share/fonts/ttf
sudo chmod 644 simsun.ttf
sudo mkfontdir
sudo mkfontscale

Add the path to the /etc/X11/xorg.conf:

Section "Files"
        …
        FontPath     "/usr/share/fonts/TTF"
        …
EndSection

Refresh the fontconfig cache

sudo fc-cache -fv

Restart X server, then use xlsfonts and fc-list to check whether the font has been installed.

Firefox Chinese rendering is awesome without bold/Italic effect, I am quite satisfied with the output:

Firefox rendering Chinese font


Existed problems

Konqueror rendering Chinese font

All KDE application could not render Chinese pages, for unknown reason, kochi is preferred instead of simsun although I configure the SimSun as the No. 1 substitution font for all English fonts.

URXVT rendering Chinese font
URXVT rendering Chinese font updated


I prefer the lightweight rxvt-unicode terminal using monospace font, it can display Chinese, but quite ugly. It looks like the font engine uses two different fonts to render Chinese.

Update: using grep font /proc/`pidof urxvt`/maps, I found that the 12x13ja.pcf is used in rendering the font. URXVT would use the Japanese font first then fall back to Simsun for missing character, remove the font and restart urxvt, everything is fine as the right screenshot.

FVWM title rendering Chinese font

FVWM has the problem to render the Chinese in the title bar using xft:Verdana:bold

Update: I am back to KDE 3.5.7, sacrificing a little bit performance and memory for better user experience. The easiest way to get sharp Chinese font in LCD display is to use Microsoft Yahei font, released with Microsoft Windows Vista. This font supports crispy English and Chinese. For example, the konsole and amarok rendering the Chinese font:

Konsole rendering Chinese font
Amarok rendering Chinese font


Configure all the fonts in Kopete, and don’t forget to setup the font in chat window:

Kopete rendering Chinese font


However, Konqueror still has the problem to render Chinese, especially specific size. The left is the shrunk font, we see only some characters are missing, while we increase the font, all the fonts are missing, refer to the bottom.

Koqueror rendering shrunk Chinese font


Kopete rendering normal Chinese font


Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

9 Comments to “HOWTO display sharp Chinese in Gentoo Linux?”

  1. r0bertz | May 12th, 2007 at 5:59 pm

    have you used my ~/.fonts.conf

  2. roylez | July 20th, 2007 at 4:06 am

    Why don’t you try bitmap fonts in urxvt? Personally I use the combination of Fixed and Wenquanyi, and the display is quite good. What is your English font in urxvt? It looks like a bitmap font, but I am not sure.
    http://farm2.static.flickr.com/1057/857760379_59a112e5d6_o.png

  3. HOWTO display sharp Chinese in Gentoo Linux | Fei Nan.com Blog | October 5th, 2007 at 9:01 pm

    [...] HOWTO display sharp Chinese in Gentoo Linux? [...]

  4. ZoorkReakrah | August 2nd, 2008 at 7:57 pm

    Thanks !

  5. 阿炜的博客 » Blog Archive » gentoo-linux中文显示和输入 | January 27th, 2009 at 10:36 pm

    [...] http://kunxi.org/archives/2007/05/howto-display-sharp-chinese-in-gentoo-linux/ [...]

  6. noname | September 8th, 2009 at 1:16 pm

    Thanks! This was exactly what I was looking for.

  7. David | January 30th, 2011 at 4:17 am

    Cool! It works with Sabayon LInux! Thanks a million!

  8. Jordan | August 18th, 2011 at 9:02 am

    @Davin
    I must be doing something wrong! It would not work with Sabayon for me.

  9. vannie | November 15th, 2011 at 7:17 pm

    I’m gonna try it. Thanks for sharing it!

Leave a Comment