| 代码: |
|
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- /etc/fonts/local.conf file to configure local fonts --> <fontconfig> |
| 代码: |
|
<!-- fonts alias settings --> <match target="pattern"> <test name="family"> <string>宋体</string> </test> <edit name="family" mode="assign"> <string>SimSun</string> </edit> </match> <match target="pattern"> <test name="family"> <string>新宋体</string> </test> <edit name="family" mode="assign"> <string>NSimSun</string> </edit> </match> |
| 代码: |
|
<!-- Mark common families with their generics so we'll get something reasonable --> <!-- Sans-serif faces --> <alias> <family>Tahoma</family> <family>Verdana</family> <family>Arial</family> <family>Trebuchet MS</family> <family>Comic Sans MS</family> <family>SimSun</family> <family>SimHei</family> ... <family>STHupo</family> <family>STXinwei</family> <family>FZYaoTi</family> <family>FZShuTi</family> <family>Arial Unicode MS</family> <default><family>sans-serif</family></default> </alias> <!-- Serif faces --> <alias> <family>Georgia</family> <family>Times New Roman</family> <family>WenQuanYi Bitmap Song</family> <default><family>serif</family></default> </alias> <!-- Monospace faces --> <alias> <family>Courier New</family> <family>Andale Mono</family> <family>NSimSun</family> <default><family>monospace</family></default> </alias> |
| 代码: |
|
<!-- Provide required aliases for standard names --> <alias> <family>sans-serif</family> <prefer> <family>Tahoma</family> <family>Verdana</family> <family>Arial</family> <family>Trebuchet MS</family> <family>Comic Sans MS</family> <family>SimSun</family> <family>SimHei</family> ... <family>STHupo</family> <family>STXinwei</family> <family>FZYaoTi</family> <family>FZShuTi</family> <family>Arial Unicode MS</family> </prefer> </alias> <alias> <family>serif</family> <prefer> <family>Georgia</family> <family>Times New Roman</family> <family>WenQuanYi Bitmap Song</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>Courier New</family> <family>Andale Mono</family> <family>NSimSun</family> </prefer> </alias> |
| 代码: |
|
<!-- SimSun english portion substitutionsubstitution --> <match target="pattern"> <test name="family" > <string>SimSun</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>Tahoma</string> </edit> </match> |
| 代码: |
|
<!-- NSimSun english portion substitutionsubstitution --> <match target="pattern"> <test name="family" > <string>NSimSun</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>Courier New</string> </edit> </match> |
| 代码: |
|
<!-- Courier substitution --> <match target="pattern"> <test name="family" > <string>Courier</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>Courier New</string> </edit> </match> |
| 代码: |
|
<!-- Bold Tahoma/Verdana substitution: when its size more than 20px,substitution with Bold Arial --> <match target="pattern"> <test name="family" > <string>Tahoma</string> <string>Verdana</string> </test> <test name="weight" compare="more_eq"> <int>180</int> </test> <test name="pixelsize" compare="more_eq" > <double>20</double> </test> <edit name="family" mode="prepend" binding="strong"> <string>Arial</string> </edit> </match> |
| 代码: |
|
<!-- Target dots per inch, change dpi to 96 --> <match target="pattern" > <edit name="dpi" mode="assign" > <double>96</double> </edit> </match> |
| 代码: |
|
<!-- Enable sub-pixel rendering. If you are using CRT, set rgb -> none --> <match target="font"> <edit name="rgba" mode="assign"> <const>none</const> </edit> </match> |
| 代码: |
|
<!-- Font size settings: set the apposite font size,so it's easy to be read --> <match target="pattern" > <test name="pixelsize" compare="more_eq" > <double>8</double> </test> <test name="pixelsize" compare="less_eq" > <double>12</double> </test> <edit name="pixelsize" mode="assign" > <double>12</double> </edit> </match> |
| 代码: |
|
<!-- Artificial oblique for fonts without an italic or oblique version --> <match target="font"> <!-- check to see if the font is roman --> <test name="slant"> <const>roman</const> </test> <!-- check to see if the pattern requested non-roman --> <test target="pattern" name="slant" compare="not_eq"> <const>roman</const> </test> <!-- multiply the matrix to slant the font --> <edit name="matrix" mode="assign"> <times> <name>matrix</name> <matrix> <double>1</double><double>0.2</double> <double>0</double><double>1</double> </matrix> </times> </edit> <!-- pretend the font is oblique now --> <edit name="slant" mode="assign"> <const>oblique</const> </edit> </match> |
| 代码: |
|
<!-- 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>180</int> </test> <!-- set the embolden flag --> <edit name="embolden" mode="assign"> <bool>true</bool> </edit> </match> |
| 代码: |
|
<!-- Default Fonts setting here autohint = ture / hinting = false is for free fonts in your system we will use autohint = false / hinting = true for MS core fonts --> <match target="font" > <edit name="antialias" mode="assign" > <bool>true</bool> </edit> <edit name="autohint" mode="assign" > <bool>true</bool> </edit> <edit name="hinting" mode="assign" > <bool>false</bool> </edit> <edit name="hintstyle" mode="assign" > <const>hintfull</const> </edit> </match> |
| 代码: |
|
<!-- The dual-width Asian fonts (spacing=dual) are not rendered correctly, apparently FreeType forces all widths to match. Trying to disable the width forcing code by setting globaladvance=false alone doesn't help. As a brute force workaround, also set spacing=proportional, i.e. handle them as proportional fonts: --> <match target="font"> <test name="lang" compare="contains" > <string>zh</string> <string>ja</string> <string>ko</string> </test> <edit name="spacing" mode="assign" > <const>proportional</const> </edit> <edit name="globaladvance" mode="assign" > <bool>false</bool> </edit> </match> |
| 代码: |
|
<!-- CJK antialias settings: when font size (in pixel) between 8 and 20px --> <match target="font" > <test name="lang" compare="contains" > <string>zh</string> <string>ja</string> <string>ko</string> </test> <test name="pixelsize" compare="more_eq" > <double>8</double> </test> <test name="pixelsize" compare="less_eq" > <double>20</double> </test> <edit name="antialias" mode="assign" > <bool>false</bool> </edit> <edit name="autohint" mode="assign" > <bool>false</bool> </edit> <edit name="hinting" mode="assign" > <bool>false</bool> </edit> </match> |
| 代码: |
|
<!-- CJK antialias settings: when font size (in pixel) more than 20px, enable AA. --> <match target="font" > <test name="lang" compare="contains" > <string>zh</string> <string>ja</string> <string>ko</string> </test> <test name="pixelsize" compare="more_eq" > <double>20</double> </test> <edit name="antialias" mode="assign" > <bool>true</bool> </edit> <edit name="autohint" mode="assign" > <bool>true</bool> </edit> <edit name="hinting" mode="assign" > <bool>true</bool> </edit> </match> |
| 代码: |
|
<!-- Italic CJK fonts,enable AA --> <match target="font"> <test name="lang" compare="contains" > <string>zh</string> <string>ja</string> <string>ko</string> </test> <test name="slant" compare="not_eq"> <const>roman</const> </test> <edit name="antialias" mode="assign" > <bool>true</bool> </edit> <edit name="autohint" mode="assign" > <bool>true</bool> </edit> <edit name="hinting" mode="assign" > <bool>true</bool> </edit> </match> |
| 代码: |
|
<!-- Microsoft fonts settings --> <!-- default : smoothed and hinted --> <match target="font" > <test name="foundry" > <string>monotype</string> <string>microsoft</string> </test> <edit name="antialias" mode="assign" > <bool>true</bool> </edit> <edit name="autohint" mode="assign" > <bool>false</bool> </edit> <edit name="hinting" mode="assign" > <bool>true</bool> </edit> <edit name="hintstyle" mode="assign" > <const>hintfull</const> </edit> </match> |
| 代码: |
|
<!-- Microsoft YaHei Enable AA --> <match target="font" > <test name="family" compare="eq" > <string>Microsoft YaHei</string> </test> <edit name="antialias" mode="assign" > <bool>true</bool> </edit> <edit name="autohint" mode="assign" > <bool>false</bool> </edit> <edit name="hinting" mode="assign" > <bool>true</bool> </edit> <edit name="hintstyle" mode="assign" > <const>hintfull</const> </edit> </match> |
| 代码: |
|
<!-- Courier New: both enable autohint and hinting looks very well. --> <match target="font" > <test name="family" > <string>Courier</string> <string>Courier New</string> </test> <edit name="antialias" mode="assign" > <bool>true</bool> </edit> <edit name="autohint" mode="assign" > <bool>true</bool> </edit> <edit name="hinting" mode="assign" > <bool>true</bool> </edit> <edit name="hintstyle" mode="assign" > <const>hintfull</const> </edit> </match> |
| 代码: |
|
<!-- Courier New font size --> <match target="font" > <test name="family" > <string>Courier New</string> </test> <test name="pixelsize" compare="less_eq" > <double>14.7</double> </test> <edit name="pixelsize" mode="assign" > <double>14.7</double> </edit> </match> |
| 代码: |
|
</fontconfig> |
| 代码: |
|
<!-- Microsoft fonts settings --> <!-- default : smoothed and hinted --> <match target="font" > <test name="foundry" > <string>monotype</string> <string>microsoft</string> </test> <edit name="antialias" mode="assign" > <bool>false</bool> </edit> <edit name="autohint" mode="assign" > <bool>false</bool> </edit> <edit name="hinting" mode="assign" > <bool>true</bool> </edit> <edit name="hintstyle" mode="assign" > <const>hintfull</const> </edit> </match> |
| 代码: |
|
<!-- Courier New: both enable autohint and hinting looks very well. --> <match target="font" > <test name="family" > <string>Courier</string> <string>Courier New</string> </test> <edit name="antialias" mode="assign" > <bool>false</bool><!--这里关闭了--> </edit> <edit name="autohint" mode="assign" > <bool>false</bool><!--这里关闭了--> </edit> <edit name="hinting" mode="assign" > <bool>true</bool><!--这里打开了--> </edit> <edit name="hintstyle" mode="assign" > <const>hintfull</const> </edit> </match> |