Ubuntu 黑体解决方案

From: http://www.osxcn.com/ubuntu/edgy-stheiti.html
结合 “Ubuntu的黑体解决方案” 和 “Ubuntu的黑体解决方案(续)” 这 2 篇文章。

此方法在 Ubuntu 6.06、6.10、7.04 上测试通过。
如果你不喜欢华文黑体,也可以使用其他黑体来代替,修改方法不变。

使用华文黑体 (STHeiti) 替换 Ubuntu 中文字体方法:

1、下载 STHeiti 字体

这里下载 stheiti.rar 字体包,解压后复制到 /usr/share/fonts/truetype 下面。

设置 STHeiti.ttf 可读权限:

sudo chmod +r /usr/share/fonts/truetype/stheiti.ttf

2、设置 STHeiti 为首选中文字体

sudo gedit /etc/fonts/language-selector.conf

找到下面内容所在行(共有三处):

<family>Bitstream Vera .... </family>

在他们下面一行添加:

<family>STHeiti</family>

刷新字体缓存:

sudo fc-cache -f -v

3、设置英文字体和渲染方式

打开 “系统-首选项-字体” 面板:

在字体选项里选择一款英文字体,如:Lucida Grande 或者 Bitstream Vera Sans。
在 “字体渲染” 选项中选择 “次象素平滑” 或者 “最佳形状” 。
update (07/4/21): 也可以参照 “更好的华文黑体渲染效果” 那样设置。

注意:如果发现在 Firefox 里英文显示不正常,需要在 Firefox 的 “选项 –> 内容 –> 字体和颜色” 中选择一款英文字体,如:Lucida Grande 或者 Bitstream Vera Sans。

4、强制 STHeiti 不使用微调

sudo gedit /etc/fonts/fonts.conf

加入下面一段:

<match target="font">
    <test name="family">
        <string>STHeiti</string>
    </test>
    <edit name="hinting">
        <bool>false</bool>
    </edit>
</match>

如果不明白为什么要最后这一步,请看这里“Ubuntu的黑体解决方案(续)

OK,使用Ctrl+Alt+BackSpace重启x看效果。

Tags: linux, ubuntu, 字体, 黑体

相关日志

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

还没有评论。

发表评论

(必填)

(必填)


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Comment moderation is enabled. Your comment may take some time to appear.