Projects - GNU/Linux in Chinese
The first problem for Chinese users may be the ugly display of Chinese fonts in GNU/Linux. I have no more strict demand but just display the normal Chinese fonts in my Slackware Linux, so here gives the basic idea about the configuration for Chinese fonts. If you demand this strictly, please look for more documents about this field.
This is the simple localization for Chinese in GNU/Linux.
ttmkfdir or mkfontscale and mkfontdirI divided the situation into the following two situations.
FontPath "/path/to/fonts"where the /path/to/ stands for the path to store the fonts directory as /usr/share/ for my configuration.1
#ttmkfdir #cp fonts.scale fonts.dirif you can use
ttmkfdir or
#mkfontscale #mkfontdirif you cannot use
ttmkfdir.style "gtk-default-zh-cn" { fontset = "-bitstream-bitstream vera serif-medium-r-*-*-14-*-*-*-*-*-*-*,\ -misc-*-medium-r-*-*-16-*-*-*-*-*-gbk-0" } class "GtkWidget" style "gtk-default-zh-cn"
xlsfonts or xfontsel or you can directly find the one in the file "fonts.scale" and "fonts.dir".<!-- Add the following code to the end --> <!-- This expression is added by Akito Hirai<akito@kde.gr.jp> for convenience.--> <!-- It can be used to make artificial bold versions in client libraries/applications.--> <match target="font"> <test name="weight"> <const>medium</const> </test> <test target="pattern" name="weight" compare="more"> <const>medium</const> </test> <edit name="weight" mode="assign"> <if> <more> <name>spacing</name> <const>proportional</const> </more> <const>demibold</const> <const>bold</const> </if> </edit> </match> <match target="font"> <test name="pixelsize" compare="less_eq"> <double>16</double> </test> <test name="pixelsize" compare="more_eq"> <double>8</double> </test> <edit name="antialias" mode="assign"> <bool>f</bool> </edit> </match> <!-- added by Haiyong Zheng --> <!-- set up the minimum font for SimSun to make little Chinese fonts good look --> <match target="font" > <test qual="any" name="family" compare="eq" > <string>SimSun</string> </test> <test compare="more_eq" name="pixelsize" > <int>8</int> </test> <test compare="less_eq" name="pixelsize" > <int>12</int> </test> <edit mode="assign" name="pixelsize" > <int>12</int> </edit> </match> <!-- substitue bold SimSun by SimHei --> <match target="pattern"> <test name="family"><string>SimSun</string></test> <test name="weight" compare="more_eq"><const>bold</const></test> <edit name="family" mode="assign"><string>SimHei</string></edit> </match> <!-- turn SimSun fonts AA off --> <match target="font"> <test qual="any" name="family"><string>SimSun</string></test> <edit name="antialias" mode="assign"><bool>false</bool></edit> </match>
style "user-font" { font_name="Bitstream Vera Sans 9" font_name="simsun 14" } class "*" style "user-font"
#qtconfig
1. If something goes wrong, just have a try to uncomment the "Load xtt" line of the file "/etc/X11/XF86Config" or "/etc/X11/xorg.conf".
2. The symbol "+" stands for adding the following codes into the file in front of "+".