|
发表于 2006-5-14 16:49:54
|
显示全部楼层
我抄别人的……
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/usr/share/fonts</dir>
<dir>~/.fonts/</dir>
<!--
配置粗体中文显示,要配合freetype-2.1.10,libxft-2.1.7,fontconfig-2.3.X
-->
<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>180</int>
</test>
<!-- set the embolden flag -->
<edit name="embolden" mode="assign">
<bool>true</bool>
</edit>
</match>
<!--default settings for all fonts.-->
<match target="font" >
<!-- 打開字體的反鋸齒即AA,大號字用AA會更美觀 -->
<edit mode="assign" name="antialias" >
<bool>t</bool>
</edit>
<edit mode="assign" name="hintstyle" >
<const>hintslight</const>
</edit>
<!-- 打開hint -->
<edit mode="assign" name="hint" >
<bool>t</bool>
</edit>
<!-- 關閉autohint -->
<edit mode="assign" name="autohint" >
<bool>false</bool>
</edit>
</match>
<!-- 關閉 8到17號字體的AA -->
<match target="font" >
<test compare="contains" name="lang" >
<string>zh-cn</string>
<string>zh-tw</string>
<string>ja</string>
<string>ko</string>
</test>
<test compare="more_eq" name="pixelsize" qual="any" >
<double>8</double>
</test>
<test compare="less_eq" name="pixelsize" qual="any" >
<double>17</double>
</test>
<edit mode="assign" name="antialias" >
<bool>false</bool>
</edit>
</match>
<!-- Enable sub-pixel rasterisaton on LCD displays -->
<match target="font">
<edit name="rgba" mode="assign">
<const>rgb</const>
</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" qual="any" >
<string>SimSun</string>
<string>NSimSun</string>
<string>SimHei</string>
<string>Tahoma</string>
<string>KaiTi_GB2312</string>
</test>
<test compare="more_eq" name="pixelsize" >
<int>8</int>
</test>
<test compare="less_eq" name="pixelsize" >
<int>12</int>
</test>
<edit compare="eq" name="pixelsize" >
<int>12</int>
</edit>
</match>
<!-- Default fonts -->
<alias>
<family>Bitstream Vera Serif</family>
<family>Times New Roman</family>
<family>Times</family>
<family>SimSun</family>
<family>Tahoma</family>
<default><family>serif</family></default>
</alias>
<alias>
<family>Bitstream Vera Sans</family>
<family>Tahoma</family>
<family>SimSun</family>
<family>Tahoma</family>
<default><family>sans-serif</family></default>
</alias>
<alias>
<family>Bitstream Vera Sans Mono</family>
<family>Courier</family>
<family>Courier New</family>
<family>SimSun</family>
<family>Tahoma</family>
<default><family>monospace</family></default>
</alias>
<!--字体替换顺序-->
<alias>
<family>serif</family>
<prefer>
<family>Times New Roman</family>
<family>Times</family>
<family>SimSun</family>
<family>Tahoma</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Tahoma</family>
<family>SimSun</family>
<family>Tahoma</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Terminal</family>
<family>Courier New</family>
<family>SimSun</family>
<family>Tahoma</family>
</prefer>
</alias>
<match target="font">
<test target="pattern" name="slant" compare="eq"><const>oblique</const></test>
<edit name="antialias" mode="assign"><bool>true</bool></edit>
</match>
<match target="font">
<test target="pattern" name="slant" compare="eq"><const>italic</const></test>
<edit name="antialias" mode="assign"><bool>true</bool></edit>
</match>
<!-- Default fonts -->
<match target="font">
<!-- check to see if the pattern requested -->
<test target="pattern" name="weight" compare="more">
<const>medium</const>
</test>
<!-- pretend the font is bold now -->
<edit name="embolden" mode="assign">
<bool>true</bool>
</edit>
</match>
<!-- artificial bold by: firefly-->
<match target="font">
<test target="pattern" name="weight" compare="more">
<const>medium</const>
</test>
<edit name="weight" mode="assign">
<const>bold</const>
</edit>
</match>
</fontconfig> |
|