Ubuntu 9.04 Chinese font settings memo

Source: Internet
Author: User
Http://hi.baidu.com/xiaopaozi/blog/item/d246df7fa15a920229388a75.html/cmtid/d291598bf8fb74739e2fb4af2009-11-06 11: 24
When installing Ubuntu, I chose to install it in English. After installation, the default Chinese font is Ar PL uming CN. Looking at the strange Chinese character, I want to change it to the of wenquanyi. After reading the configuration on the Internet, we all said we would like to modify the configuration file/etc/fonts/CONF. d/69-language-selector-zh-cn.conf. I found my/etc/fonts/CONF. d/does not have this file,/etc/fonts/CONF. avail has this file, so you can modify it and restart X. It has no effect (of course, it has no effect. Let's look down ). In this way, I have modified and tested/etc/fonts/CONF. avail/69-language-selector-zh-cn.conf n times, and it has no effect at all.
How to know the application Program What fonts are loaded? If I know this, I can find out the cause. So I decided to look at the fonts-config document and found fc_debug. Set it to 8 to see how the font is loaded when the application is started, and set fc_debug to 1024, you can see the font configuration file loaded by the application. I really want to thank the person who designed font-config for thinking too well. In my test, it seems that we should first clear the font cache and run the following command:
Set fc_debug to 1024
$ Export fc_debugging = 1024
$ Sudo FC-Cache-VF
$ Gedit
In this way, I can see the configuration files of fonts loaded by gedit. Only then can I find that all files loaded by gedit are/etc/fonts/CONF. d file, I suddenly realized that I should be in/etc/fonts/CONF. d. Create a symbolic link to/etc/fonts/CONF. avail/69-language-selector-zh-cn.conf (please look down on me !). Create a link, restart X, and everything is OK.

I found that 69-language-selector-zh-cn.conf has three parts: Serif, sans-serif, and monospace. What are the differences between these three fonts?

In the Roman alphabet camp in western countries, there are two main types of fonts: sans serif and serif. Although the typewriter also belongs to sans serif, it is an equal-width font, therefore, the monospace type is independent. For example, in the Web Code Usually use the same width font.

Serif indicates that there is additional decoration at the beginning and end of the stroke, and the stroke width varies depending on the straight stroke. On the contrary, sans serif does not have these additional decorations, and the stroke width is roughly the same.

We can see that the usual Georgia, Times New Roman, etc. belong to the serif font, while Arial, tahoma, verdana, etc. belong to the sans serif font.
For Chinese, these two types also exist. and (commonly used in traditional Chinese) belong to Serif, while simhei and youyuan belong to sans serif.

Serif
English Font: Georgia, Times New Roman, etc. Top 10 serif body text Fonts
Chinese font:, (commonly used in traditional Chinese), etc.
Sans serif
English Font: Arial, tahoma, verdana, etc. Top 10 sans serif body text Fonts
Chinese font: simhei, youyuan, etc.

It should be configured as follows: For the serif part, use wenquanyi, sans serif to use wenquanyi or wenquanyi micron, and monospace to use wenquanyi or wenquanyi.
However, the default GNOME font is sans, and the Chinese will use wenquanyi zhenhei or wenquanyi micron black. I like wenquanyi Z, so sans serif I also use wenquanyi, the following is my configuration file.

<Fontconfig>

<Match target = "pattern">
<Test qual = "any" name = "family">
<String> serif </string>
</Test>
<Edit name = "family" mode = "prepend" binding = "strong">
<String> wenquanyi bitmap song </string>
<String> wenquanyi micro Hei </string>
<String> wenquanyi Zen Hei </string>
<String> ar PL uming CN </string>
<String> ar PL shanheisun uni </string>
<String> bitstream Vera serif </string>
<String> dejavu serif </string>
<String> ar PL Ukai CN </string>
<String> ar PL zenkai uni </string>
</Edit>
</Match>
<Match target = "pattern">
<Test qual = "any" name = "family">
<String> sans-serif </string>
</Test>
<Edit name = "family" mode = "prepend" binding = "strong">
<String> bitstream Vera sans </string>
<String> dejavu sans </string>
<String> wenquanyi bitmap song </string>
<String> wenquanyi micro Hei </string>
<String> wenquanyi Zen Hei </string>
<String> ar PL uming CN </string>
<String> ar PL shanheisun uni </string>
<String> ar PL Ukai CN </string>
<String> ar PL zenkai uni </string>
</Edit>
</Match>
<Match target = "pattern">
<Test qual = "any" name = "family">
<String> monospace </string>
</Test>
<Edit name = "family" mode = "prepend" binding = "strong">
<String> bitstream Vera sans mono </string>
<String> dejavu sans mono </string>
<String> wenquanyi micro Hei mono </string>
<String> wenquanyi Zen Hei mono </string>
<String> wenquanyi bitmap song </string>
<String> ar PL uming CN </string>
<String> ar PL shanheisun uni </string>
<String> ar PL Ukai CN </string>
<String> ar PL zenkai uni </string>
</Edit>
</Match>

</Fontconfig>

References:
Http://forum.ubuntu.org.cn/viewtopic.php? F = 8 & t = 144940 & START = 0
Http://hi.chinaunix.net /? Uid-288152-action-viewspace-itemid-6533
Http://blog.csdn.net/wuyao721/archive/2009/08/09/4428824.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.