Search This Blog

Ubuntu 中文字体美化方案大全 (3): 使用Windows XP字体

首先,下载安装Windows XP 字体,做好准备工作
然后,编辑下面两个文件:

1. /etc/fonts/conf.d/69-language-selector-zh-cn.conf
<fontconfig>
        <match target="pattern">
                <test name="family" qual="any">
                        <string>serif</string>
                </test>
                <edit binding="strong" mode="prepend" name="family">
                        <string>Tahoma</string>
                        <string>SimSun</string>
                </edit>
        </match>
        <match target="pattern">
                <test name="family" qual="any">
                        <string>sans-serif</string>
                </test>
                <edit binding="strong" mode="prepend" name="family">
                        <string>Tahoma</string>
                        <string>SimSun</string>
                </edit>
        </match>
        <match target="pattern">
                <test name="family" qual="any">
                        <string>monospace</string>
                </test>
                <edit binding="strong" mode="prepend" name="family">
                        <string>Courier New</string>
                        <string>verdana</string>
                        <string>SimSum</string>
                </edit>
        </match>
</fontconfig>

2. /etc/fonts/conf.d/99-language-selector-zh.conf
<fontconfig>

 
        <match target="font">
                <test compare="contains" name="family">
                        <string>Song</string>
                        <string>Sun</string>
                        <string>Kai</string>
                        <string>Ming</string>
                        <string>Hei</string>
                        <string>LiSu</string>
                </test>
                
                <test compare="less_eq" name="weight">
                        <int>100</int>
                </test>
                <test compare="more_eq" name="weight" target="pattern">
                        <int>180</int>
                </test>
                <edit mode="assign" name="embolden">
                        <bool>true</bool>
                </edit>
        </match>
 
 
        <match target="font">
  
                <test compare="contains" name="family">
   
                        <string>Tahoma</string>
                        <string>verdana</string>
                        <string>Arial</string>
                        <string>Times</string>
                        <string>Courier</string>
   
                        <string>Song</string>
                        <string>Sun</string>
                        <string>Kai</string>
                        <string>Ming</string>
                        <string>Hei</string>
                        <string>LiSu</string>
   <string>LiTi</string>
                        <string>宋</string>
                        <string>仿宋</string>
                        <string>黑</string>
                        <string>楷</string>
                        <string>隶</string>
                </test>

  
                <edit name="globaladvance">
                        <bool>false</bool>
                </edit>

  
                <edit name="spacing">
                        <int>0</int>
                </edit>
  
  
                <edit name="hinting">
                        <bool>true</bool>
                </edit>

  
                <edit name="autohint">
                        <bool>false</bool>
                </edit>

  
                <edit mode="assign" name="antialias">
                        <bool>true</bool>
                </edit>
        </match>

 
        <match target="font">
  
                <test compare="contains" name="family">
   
                        <string>Tahoma</string>
                        <string>verdana</string>

                        <string>Arial</string>
                        <string>Times</string>
                        <string>Courier</string>
   
                        <string>Song</string>
                        <string>Sun</string>
                        <string>Kai</string>
                        <string>Ming</string>
                        <string>Hei</string>
                        <string>LiSu</string>
   <string>LiTi</string>
                        <string>宋</string>
                        <string>仿宋</string>
                        <string>黑</string>
                        <string>楷</string>
                        <string>隶</string>
                </test>

  
                <test compare="more_eq" name="pixelsize">
                        <int>5</int>
                </test>

  
                <test compare="less_eq" name="pixelsize">
                        <int>18</int>
                </test>

  
                <edit mode="assign" name="antialias">
                        <bool>false</bool>
                </edit>
        </match>

</fontconfig>

最后,重启XWindow
  • Log out
  • Ctrl + Alt + Backspace 重启XWindow, 使配置生效

[参考文献]














No comments:

Post a Comment