用Windows字体美化Ubuntu

时间: 2008-04-28 / 分类: 收藏 / 浏览次数: 5,922 / 0个评论 发表评论

1、安装MS字体tahomabd.ttf可能xp中没有,我是在2003中找到的。sudo mkfontscale
sudo mkfontdir
sudo fc-cache

cd /usr/share/fonts
sudo mkdir zh_CN

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

复制完以后要改变权限

cd zh_CN
sudo chmod 644 *

然后执行

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 重启X-windows
按Ctrl+Alt+Backspace 或者 登出

4 字体设置
上面菜单 系统-首选项-字体
font-setup1.jpg
细节
font-setup3.jpg

firefox也需要设置一下

firefox-font-setup1.jpg
高级
firefox-font-setup2.jpg

终端字体现在非常难看,你要自己定义一下,自己选一个看着顺眼的吧。

如果你的机器上没有装Windows,我这里提供一个所需字体打包下载
大家注意,用windows字体存在版权问题。

发表评论

您的昵称 *

您的邮箱 *

您的网站