|
|
喝喝, 我平时一般不怎么emerge sync, 昨天sync了一下才转到modular X的
~x86的话, emerge -1u fontconfig freetype libXft, 然后打开 /etc/fonts/fonts.conf后, 找到下面这段:
- <!--
- Synthetic emboldening for fonts that do not have bold face available
- -->
- <match target="font">
- <!-- check to see if the font is just regular -->
- <test name="weight" compare="less_eq">
- <int>100</int>
- </test>
- <!-- check to see if the pattern requests bold -->
- <test target="pattern" name="weight" compare="more_eq">
- <int>200</int>
- </test>
- <!-- set the embolden flag -->
- <edit name="embolden" mode="assign">
- <bool>true</bool>
- </edit>
- </match>
复制代码
仔细看一下你就能看出问题: 比如运行
- shell> fc-match -v "serif:lang=zh-cn:bold" | egrep 'embolden|weight'
复制代码
你就会发觉, 虽然embolden是true了, 但weight还是80. 仔细想想, 让xft按weight=80 (非粗体的weight) 去渲染粗体, 出来会是什么效果呢?
所以解决办法比较简单. quick'n'dirty的话, 在</match>前加上一行
- <edit name="weight" mode="assign"><int>200</int></edit>
复制代码
就好了.
当然比较正规的方法是加一个单独配置到你的fontconfig.d里, 比如
- <?xml version="1.0"?>
- <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
- <!-- /hoard/fonts/fontconfig.d/65_boldify -->
- <fontconfig>
- <match target="font">
- <test target="pattern" name="weight" compare="more_eq">
- <int>200</int>
- </test>
- <test name="weight" compare="less"><int>200</int></test>
- <edit name="weight" mode="assign"><int>200</int></edit>
- <edit name="embolden"><bool>true</bool></edit>
- </match>
- </fontconfig>
复制代码
如果大家早就发觉了, 不要笑我啊, 我大致翻了翻最近的帖子, 基本上都是overlay的办法 |
|