Archive for the 'locale' Category

08th Oct 2007

解决 fontconfig 设置受 locale 影响

fontconfig 是个设置字体的好东西, 但遗憾的是 fontconfig 的行为会受 locale 影响. 例如 locale 为 zh_CN.UTF-8 时, fontconfig 会将一个中文字体提到 sans 列表最前面, 而不受 fonts.conf 控制.

这里找到了解决方法:

<!--
Set lang = en, see http://www.linuxsir.org/bbs/showthread.php?t=304460
-->
<match target="pattern">
    <edit name="familylang" mode="assign">
        <string>en</string>
    </edit>
    <edit name="lang" mode="assign">
        <string>en</string>
    </edit>
</match>

这样的话就跟 locale 为 en_US 一样了

副作用: flash 插件的中文无法正常显示.

Posted by Posted by admin under Filed under Linux, font, locale Comments No Comments »