bold  一直以来Linux下中文粗体没有很好的解决方案,有拿黑体顶替的;有拿圆体顶替的;有用firefly补丁的。不过现在这些都可以扔在一边了,因为最新的Freetype2已确认支持中文粗体算法。Debian用户很容易实现:

1. 把下面的源加入/etc/apt/sources.list

deb ./
deb-src ./

2. apt-get update

3. apt-get install libfreetype6 libxft2


Tips1: 如果你找不到原始的fonts.conf,而粗体也没有正常显示,可以尝试加上下面这段代码:

<match target="font">
     <!-- check to see if the font is just regular -->
     <test name="weight" compare="less_eq">
     <!-- check to see if the pattern requests bold -->
     <test target="pattern" name="weight" compare="more_eq">
     <!-- set the embolden flag -->
     <edit name="embolden" mode="assign">

Tips2: 有些论坛,比如linuxsir.org的粗体仍然会显示不正常,在fonts.conf里找下面这条,把200换成180。

<test target="pattern" name="weight" compare="more_eq">

Technorati Tags: , ,

7 Responses to “Debian下中文粗体的解決”

Leave a Reply

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).