fontconfig字型設定

※記錄一下目前在x11下的預設字型與大小的設定

.fonts.config
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="pixelsize" mode="assign">
<double>12</double>
</edit>
</match>
<match target="font">
<test name="family">
<string>AR PL New Sung</string>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
</fontconfig>


以上的設定是X11預設字型大小12pix且新宋體不做反鋸齒

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<test name="family">
<string>AR PL New Sung</string>
</test>
<test name="pixelsize" compare="more_eq">
<double>11</double>
</test>
<test name="pixelsize" compare="less_eq">
<double>16</double>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
</fontconfig>


以上是修正新宋體有的時候具有點陣字,但是卻使用向量字方式繪出,而上面強制指定若是在範圍以內全都用點陣字體。

※幾個值得參考設定的網站
http://edt1023.sayya.org/#fonts
http://swyear.blogspot.com/2009/03/fontconfig.html

0 意見: