ACme

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  17 随笔 :: 0 文章 :: 2 评论 :: 0 Trackbacks
安装Windows字体并美化

1 将 Windows下(在windows/Fonts目录下)的

simsun.ttc tahoma.ttf verdana.ttf verdanab.ttf verdanaz.ttf tahomabd.ttf verdanai.ttf

拷贝到/usr/share/fonts/zh_CN

2 安装字体

cd /usr/share/fonts/zh_CN
sudo mkfontscale
sudo mkfontdir
sudo fc-cache
sudo chmod 755 * (或者644也行)
通过替换/etc/fonts/language-selector.conf来配置字体,只有这么配置后,才能达到美化的效果,把下面的内容覆盖原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 compare="contains" >
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</test>
<test compare="more_eq" target="pattern" >
<int>180</int>
</test>
<edit mode="assign" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<test compare="contains" >
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</test>
<edit >
<bool>false</bool>
</edit>
<edit >
<int>0</int>
</edit>
<edit >
<bool>true</bool>
</edit>
<edit >
<bool>false</bool>
</edit>
<edit mode="assign">
<bool>true</bool>
</edit>
<test compare="less_eq">
<int>18</int>
</test>
<edit mode="assign" >
<bool>false</bool>
</edit>
</match>
<match target="pattern">
<test >
<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" >
<string>Tahoma</string>
<string>Verdana</string>
</edit>
</match>
<match target="pattern">
<test ><string>宋体</string></test>
<edit mode="assign"><string>SimSun</string></edit>
</match>
<match target="pattern">
<test ><string>新宋体</string></test>
<edit mode="assign"><string>SimSun</string></edit>
</match>
<match target="pattern">
<test ><string>仿宋_GB2312</string></test>
<edit mode="assign"><string>FangSong_GB2312</string></edit>
</match>
<match target="pattern">
<test ><string>楷体_GB2312</string></test>
<edit mode="assign"><string>KaiTi_GB2312</string></edit>
</match>
<match target="pattern">
<test ><string>黑体</string></test>
<edit mode="assign"><string>SimHei</string></edit>
</match>

</fontconfig>

现在可以设置GNOME的字体了,前面四个均设为Tohoma,后面一个设为Dejst sans mono book参考下面的设置

终端字体可以在终端的选项中单独设置,设置为NSimSun并适当设置大小效果比较好

同样,你也可以在firefox中设置字体。

posted on 2009-08-28 00:08 ACme 阅读(352) 评论(0)  编辑 收藏 引用 所属分类: 技术问题

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