感谢支持
我们一直在努力

ubuntu下使用XP字体美化汉字

关于Ubuntu自动挂载Windows分区,hda1是指windows系统分区,您的有可能是sda1。


此文件安装的字体适合于系统中有足够权限的所有用户。倘若您的系统是单用户,只需将字体文件复制到~/.fonts文件夹中,再刷新系统,重启X,步骤类似。请看懂後再进行操作,以免破坏您的系统。


请注意字体权限,使用该字体的用户必须至少具有字体文件的可读权限。


拷贝3个字体文件(simsun.ttc SURSONG.TTF tahoma.ttf)到/usr/share/fonts/zh_CN/TrueType/ 目录, 命令:

 mkdir -p /usr/share/fonts/zh_CN/TrueType/
sudo cp /media/hda1/windows/fonts/simsun.ttc /usr/share/fonts/zh_CN/TrueType/
sudo cp /media/hda1/windows/fonts/SURSONG.TTF /usr/share/fonts/zh_CN/TrueType/
sudo cp /media/hda1/windows/fonts/tahoma.ttf /usr/share/fonts/zh_CN/TrueType/
sudo cp /media/hda1/windows/fonts/tahomabd.ttf /usr/share/fonts/zh_CN/TrueType/
sudo chmod 644 /usr/share/fonts/zh_CN/TrueType/*
cd /usr/share/fonts/zh_CN/TrueType/
sudo mkfontscale
sudo mkfontdir
 


更新linux字体列表,命令:


sudo fc-cache /usr/share/fonts/zh_CN/TrueType/


通过替换/etc/fonts/language-selector.conf来配置字体,只有这么配置後,才能达到美化的效果,不要更改/etc/fonts/fonts.conf。



gksu 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>DejaVu Sans Mono</family>
<family>SimSun</family>
</prefer>
</alias>
<match target=”font” >
<test name=”family” compare=”contains” >
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</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>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</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=”less_eq”>
<int>18</int>
</test>
<edit name=”antialias” mode=”assign” >
<bool>false</bool>
</edit>
</match>
<match target=”pattern”>
<test name=”family”>
<string>SimSun</string>
<string>SimSun-18030</string>
<string>AR PL ShanHeiSun Uni</string>
<string>AR PL New Sung</string>
<string>MingLiU</string>
<string>PMingLiU</string>
</test>
<edit binding=”strong” mode=”prepend” name=”family”>
<string>Tahoma</string>
<string>Verdana</string>
</edit>
</match>
<match target=”pattern”>
<test name=”family”><string>宋体</string></test>
<edit name=”family” mode=”assign”><string>SimSun</string></edit>
</match>
<match target=”pattern”>
<test name=”family”><string>新宋体</string></test>
<edit name=”family” mode=”assign”><string>SimSun</string></edit>
</match>
<match target=”pattern”>
<test name=”family”><string>仿宋_GB2312</string></test>
<edit name=”family” mode=”assign”><string>FangSong_GB2312</string></edit>
</match>
<match target=”pattern”>
<test name=”family”><string>楷体_GB2312</string></test>
<edit name=”family” mode=”assign”><string>KaiTi_GB2312</string></edit>
</match>
<match target=”pattern”>
<test name=”family”><string>黑体</string></test>
<edit name=”family” mode=”assign”><string>SimHei</string></edit>
</match>
</fontconfig>
设置字体渲染为单色 系统 –> 首选项 –> 字体
attachment:Ubuntu_gnome_font.png
重启xwindows。

赞(0) 打赏
转载请注明出处:服务器评测 » ubuntu下使用XP字体美化汉字
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏