Ubuntu资讯

Ubuntu字体美化之MSfont

Ubuntu 自带的字体虽然可以凑合着用,但是对于用惯了MS字体的人来说,总会感觉看着不舒服。不过使用MS的字体还是会有版权方面的问题。这里只是给看习惯了MS Windows 操作系统界面的朋友提供一个美化方法。

1、安装MS字体

cd /usr/share/fonts
sudo mkdir zh_CN

然后将MS的字体文件(就在winxp的fonts目录下)(simsun.ttc tahoma.ttf verdana.ttf verdanab.ttf verdanaz.ttf tahomabd.ttf verdanai.ttf)复制到zh_CN目录下,然后

cd zh_CN
sudo mkfontscale
sudo mkfontdir
sudo fc-cache

注意,重启后如果出现乱码,可能是不以root身份登录到系统进行修改的,而只是用sudo的方式,建议再使用下面的命令,修改新增加的字体的权限
sudo chmod 644 /usr/share/fonts/zh_CN/*

2、修改language-selector.conf文件

sudo cp /etc/fonts/language-selector.conf /etc/fonts/language-selector.conf_backup
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">

希望看到您的想法,请您发表评论x