2007年6月27日 星期三

better chinese font on zenwalk

download http://edt1023.sayya.org/slackware/11.0/fireflysung-1.3.0p1-noarch-1.tgz
installpkg
vi /etc/fonts/conf.d/10-myfonts.conf
copy & paste
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<!-- conf.d/myfont.conf -->
<fontconfig>

<dir>/usr/share/fonts</dir>
<dir>/usr/share/fonts/local</dir>
<dir>/usr/local/share/fonts</dir>
<dir>~/.fonts</dir>
<!--加入點陣字體路徑-->
<dir>/usr/X11R6/lib/X11/fonts</dir>

<!--所有字型預設樣式-->
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
</match>

<!--打開中文粗體-->
<match target="font">
<test name="family" compare="contains">
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</test>
<test compare="more_eq" target="pattern" name="weight">
<int>180</int>
</test>
<edit mode="assign" name="embolden">
<bool>true</bool>
</edit>
</match>

<!-- 關閉小字AA -->
<match target="font">
<test name="pixelsize" compare="less">
<double>12</double>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>

<!-- 關閉宋體、明體小字AA -->
<match target="font">
<test name="family" compare="contains">
<string>Song</string>
<string>Sun</string>
<string>Ming</string>
</test>
<test name="pixelsize" compare="less_eq">
<double>20</double>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>

<!-- 解決中文字體英文間距過寬 -->
<match target="font">
<test target="pattern" name="lang" compare="contains">
<string>zh-tw</string>
<string>zh-cn</string>
<string>ja</string>
<string>ko</string>
</test>
<edit name="spacing">
<const>proportional</const>
</edit>
<edit name="globaladvance">
<bool>false</bool>
</edit>
</match>

<!--設定中文最小字號-->
<match target="font" >
<test name="family" compare="contains">
<string>Song</string>
<string>Sun</string>
<string>Kai</string>
<string>Ming</string>
</test>
<test name="pixelsize" compare="more_eq">
<double>8</double>
</test>
<test name="pixelsize" compare="less_eq">
<double>12</double>
</test>
<edit name="pixelsize" compare="eq">
<double>12</double>
</edit>
</match>

<!--適應中文用戶的用字習慣-->
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>Bitstream Vera Serif</family>
<family>Times New Roman</family>
<family>Times</family>
<family>AR PL New Sung</family>
<family>AR PL ShanHeiSun Uni</family>
<family>Kochi Mincho</family>
<family>UnBatang</family>
<family>Baekmuk Batang</family>
</prefer>
</alias>

<alias>
<family>sans-serif</family>
<prefer>
<family>DejaVu Sans</family>
<family>Bitstream Vera Sans</family>
<family>Lucida Grande</family>
<family>Helvetica</family>
<family>Arial</family>
<family>Verdana</family>
<family>AR PL New Sung</family>
<family>AR PL ShanHeiSun Uni</family>
<family>Kochi Gothic</family>
<family>UnDotum</family>
<family>Baekmuk Dotum</family>
</prefer>
</alias>

<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Bitstream Vera Sans Mono</family>
<family>Andale Mono</family>
<family>Courier New</family>
<family>Courier</family>
<family>AR PL New Sung Mono</family>
<family>AR PL New Sung</family>
<family>AR PL ShanHeiSun Uni</family>
<family>Kochi Gothic</family>
<family>Baekmuk Dotum</family>
</prefer>
</alias>

<alias>
<family>新細明體</family>
<prefer>
<family>AR PL New Sung</family>
<family>AR PL ShanHeiSun Uni</family>
</prefer>
</alias>

<alias>
<family>標楷體</family>
<prefer>
<family>AR PL New Kai</family>
<family>AR PL KaitiM Big5</family>
<family>AR PL KaitiM GB</family>
<family>AR PL ZenKai Uni</family>
</prefer>
</alias>

</fontconfig>

沒有留言: