posts - 15, comments - 0, trackbacks - 0, articles - 5
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

Ubuntu的中文美化

Posted on 2011-08-20 12:15 eamon 阅读(252) 评论(0)  编辑 收藏 引用 所属分类: Linux系统
1、安装MS字体 
cd /usr/share/fonts/truetype 
sudo mkdir ttf-windows
然后将MS的字体文件(simsun.ttc tahoma.ttf verdana.ttf verdanab.ttf verdanaz.ttf tahomabd.ttf verdanai.ttf) 复制到
ttf-windows 目录下,然后

cd ttf-windows
sudo mkfontscale
sudo mkfontdir
sudo fc-cache

2、修改language-selector.conf文件
     sudo gedit /etc/fonts/language-selector.conf
改为:
<fontconfig>

<alias>
<family>serif</family>
<prefer>
<family>Bitstream Vera Serif</family>
<family>SimSun</family>
<family>DejaVu Serif</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>

<alias>
<family>sans-serif</family>
<prefer>
<family>Bitstream Vera Sans</family>
<family>Simsun</family>
<family>DejaVu Sans</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>

<alias>
<family>monospace</family>
<prefer>
<family>Bitstream Vera Sans Mono</family>
<family>Simsun</family>
<family>DejaVu Sans Mono</family>
<family>AR PL ShanHeiSun Uni</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>


<match target="font" >
<test name="family" compare="contains" >
<string>SimSun</string>
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</test>
<test name="weight" compare="less_eq">
<int>100</int>
</test>

<test compare="more_eq" target="pattern" name="weight" >
<int>180</int>
</test>

<edit mode="assign" name="embolden" >
<bool>true</bool>
</edit>

</match>
<match target="font" >
<test name="family" compare="contains" >
<string>SimSun</string>
<string>宋体</string>
<string>宋体-18030</string>
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
<string>黑体</string>
<string>新宋体</string>
<string>新宋体-18030</string>
<string>楷体_GB2312</string>
<string>仿宋_GB2312</string>
<string>隶体</string>
<string>SimSun-18030</string>
<string>SimHei</string>
<string>NSimSun</string>
<string>NSimSun-18030</string>
<string>KaiTi_GB2312</string>
<string>FangSong_GB2312</string>
<string>LiSu</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 name="antialias" mode="assign">
<bool>true</bool>
</edit>

<test name="pixelsize" compare="more_eq">
<int>12</int>
</test>
<test name="pixelsize" compare="less_eq">

<int>24</int>
</test>

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

</fontconfig> 

3、按Ctrl+Alt+Backspace重启X-windows,应该是这样的功能吧。

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理