LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3314|回复: 19

字体使用AA的请进~~

[复制链接]
发表于 2004-10-4 15:15:12 | 显示全部楼层 |阅读模式
如果你觉得你的字体显示够PP的话,请将你的fonts.conf和local.conf贴出来可以吗?
发表于 2004-10-4 21:04:32 | 显示全部楼层
怎么没人反应,我的机上不了网,等明儿再贴,先顶一下
发表于 2004-10-4 21:27:34 | 显示全部楼层
默认的font.conf里边,楷体的字体是在simsun前出现的,如果机器上安装了GPL的汉字库,这个好像是默认安装的,就会造成楷体先出现。希望下次把font.conf改改。
 楼主| 发表于 2004-10-4 22:12:46 | 显示全部楼层
希望大家能支持一下,,这样才能写出更好的fonts.conf, 字体才能更PP了。
 楼主| 发表于 2004-10-4 22:17:00 | 显示全部楼层
这是准备加入中文portage的fonts.conf, local.conf,希望大家能提提意见:
这两个配置文件比较适合使用非AA字体的。
fonts.conf
  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- /etc/fonts/fonts.conf file to configure system font access -->
  4. <fontconfig>

  5. <!--
  6. DO NOT EDIT THIS FILE.
  7. IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
  8. LOCAL CHANGES BELONG IN 'local.conf'.

  9. The intent of this standard configuration file is to be adequate for
  10. most environments.  If you have a reasonably normal environment and
  11. have found problems with this configuration, they are probably
  12. things that others will also want fixed.  Please submit any
  13. problems to the fontconfig bugzilla system located at fontconfig.org

  14. Note that the normal 'make install' procedure for fontconfig is to
  15. replace any existing fonts.conf file with the new version.  Place
  16. any local customizations in local.conf which this file references.

  17. Keith Packard
  18. -->

  19. <!-- Font directory list configured on  -->
  20. <dir>/usr/share/fonts</dir>
  21. <dir>~/.fonts</dir>

  22. <!--
  23.   Accept deprecated 'mono' alias, replacing it with 'monospace'
  24. -->
  25. <match target="pattern">
  26.   <test qual="any" name="family">
  27.    <string>mono</string>
  28.   </test>
  29.   <edit name="family" mode="assign">
  30.    <string>monospace</string>
  31.   </edit>
  32. </match>

  33. <!--
  34.   Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
  35. -->
  36. <match target="pattern">
  37.   <test qual="any" name="family">
  38.    <string>sans serif</string>
  39.   </test>
  40.   <edit name="family" mode="assign">
  41.    <string>sans-serif</string>
  42.   </edit>
  43. </match>

  44. <!--
  45.   Accept deprecated 'sans' alias, replacing it with 'sans-serif'
  46. -->
  47. <match target="pattern">
  48.   <test qual="any" name="family">
  49.    <string>sans</string>
  50.   </test>
  51.   <edit name="family" mode="assign">
  52.    <string>sans-serif</string>
  53.   </edit>
  54. </match>

  55. <!--
  56.   Mark common families with their generics so we'll get
  57.   something reasonable
  58. -->

  59. <!--
  60.   Serif faces
  61. -->
  62. <alias>
  63.   <family>Bitstream Vera Serif</family>
  64.   <family>Times</family>
  65.   <family>Times New Roman</family>
  66.   <family>Nimbus Roman No9 L</family>
  67.   <family>Luxi Serif</family>
  68.    <family>SimSun</family>
  69.   <family>Kochi Mincho</family>
  70.   <family>AR PL SungtiL GB</family>
  71.   <family>AR PL Mingti2L Big5</family>
  72.   <family>Baekmuk Batang</family>   
  73.   <default><family>serif</family></default>
  74. </alias>
  75. <!--
  76.   Sans-serif faces
  77. -->
  78. <alias>
  79.   <family>Bitstream Vera Sans</family>
  80.   <family>Helvetica</family>
  81.   <family>Arial</family>
  82.   <family>Verdana</family>
  83.   <family>Nimbus Sans L</family>
  84.   <family>Luxi Sans</family>
  85.    <family>SimSun</family>
  86.   <family>Kochi Gothic</family>
  87.   <family>AR PL KaitiM GB</family>
  88.   <family>AR PL KaitiM Big5</family>
  89.   <family>Baekmuk Dotum</family>
  90.   <default><family>sans-serif</family></default>
  91. </alias>
  92. <!--
  93.   Monospace faces
  94. -->
  95.   <alias>
  96.   <family>Bitstream Vera Sans Mono</family>
  97.   <family>Courier</family>
  98.   <family>Courier New</family>
  99.   <family>Andale Mono</family>
  100.   <family>Luxi Mono</family>
  101.   <family>Nimbus Mono L</family>
  102.   <family>NSimSun</family>
  103.   <default><family>monospace</family></default>
  104. </alias>
  105. <!--
  106.   If the font still has no generic name, add sans-serif
  107. -->
  108. <match target="pattern">
  109.   <test qual="all" name="family" compare="not_eq">
  110.    <string>sans-serif</string>
  111.   </test>
  112.   <test qual="all" name="family" compare="not_eq">
  113.    <string>serif</string>
  114.   </test>
  115.   <test qual="all" name="family" compare="not_eq">
  116.    <string>monospace</string>
  117.   </test>
  118.   <edit name="family" mode="append_last">
  119.    <string>sans-serif</string>
  120.   </edit>
  121. </match>

  122. <!--
  123.   Some Asian fonts misadvertise themselves as monospaced when
  124.   in fact they are dual-spaced (half and full).  This makes
  125.   FreeType very confused as it forces all widths to match.
  126.   Undo this magic by disabling the width forcing code -->
  127.   <!--
  128. <match target="font">
  129.   <test name="family">
  130.    <string>GulimChe</string>
  131.   </test>
  132.   <edit name="globaladvance">
  133.    <bool>false</bool>
  134.   </edit>
  135. </match>

  136. <match target="font">
  137.   <test name="family">
  138.    <string>DotumChe</string>
  139.   </test>
  140.   <edit name="globaladvance">
  141.    <bool>false</bool>
  142.   </edit>
  143. </match>

  144. <match target="font">
  145.   <test name="family">
  146.    <string>BatangChe</string>
  147.   </test>
  148.   <edit name="globaladvance">
  149.    <bool>false</bool>
  150.   </edit>
  151. </match>

  152. <match target="font">
  153.   <test name="family">
  154.    <string>GungsuhChe</string>
  155.   </test>
  156.   <edit name="globaladvance">
  157.    <bool>false</bool>
  158.   </edit>
  159. </match>
  160. <match target="font">
  161.   <test name="family">
  162.    <string>YouYuan</string>
  163.   </test>
  164.   <edit name="globaladvance">
  165.    <bool>false</bool>
  166.   </edit>
  167. </match>
  168. <match target="font">
  169.   <test name="family">
  170.    <string>NSimSun</string>
  171.   </test>
  172.   <edit name="globaladvance">
  173.    <bool>false</bool>
  174.   </edit>
  175. </match>
  176. <match target="font">
  177.   <test name="family">
  178.    <string>LiSu</string>
  179.   </test>
  180.   <edit name="globaladvance">
  181.    <bool>false</bool>
  182.   </edit>
  183. </match>
  184. -->
  185. <!--
  186. The Bitstream Vera fonts have GASP entries suggesting that hinting be
  187. disabled below 8 ppem, but FreeType ignores those, preferring to use
  188. the data found in the instructed hints.  The initial Vera release
  189. didn't include the right instructions in the 'prep' table. Fix this
  190. by disabling hinting manually at smaller sizes (< 8ppem)
  191. -->

  192. <match target="font">
  193.   <test name="family">
  194.    <string>Bitstream Vera Sans</string>
  195.   </test>
  196.   <test name="pixelsize" compare="less">
  197.    <double>7.5</double>
  198.   </test>
  199.   <edit name="hinting">
  200.    <bool>false</bool>
  201.   </edit>
  202. </match>

  203. <match target="font">
  204.   <test name="family">
  205.    <string>Bitstream Vera Serif</string>
  206.   </test>
  207.   <test name="pixelsize" compare="less">
  208.    <double>7.5</double>
  209.   </test>
  210.   <edit name="hinting">
  211.    <bool>false</bool>
  212.   </edit>
  213. </match>

  214. <match target="font">
  215.   <test name="family">
  216.    <string>Bitstream Vera Sans Mono</string>
  217.   </test>
  218.   <test name="pixelsize" compare="less">
  219.    <double>7.5</double>
  220.   </test>
  221.   <edit name="hinting">
  222.    <bool>false</bool>
  223.   </edit>
  224. </match>

  225. <!--
  226.   Load per-user customization file
  227. -->
  228. <include ignore_missing="yes">~/.fonts.conf</include>

  229. <!--
  230.   Load local system customization file
  231. -->
  232. <include ignore_missing="yes">local.conf</include>

  233. <!--
  234.   Alias well known font names to available TrueType fonts
  235. -->
  236. <alias>
  237.   <family>Times</family>
  238.   <accept><family>Times New Roman</family></accept>
  239. </alias>
  240. <alias>
  241.   <family>Helvetica</family>
  242.   <accept><family>Verdana</family></accept>
  243. </alias>
  244. <alias>
  245.   <family>Arial</family>
  246.   <accept><family>Verdana</family></accept>
  247. </alias>
  248. <alias>
  249.   <family>Courier</family>
  250.   <accept><family>Courier New</family></accept>
  251. </alias>

  252. <!--
  253. Check user preference to avoid bitmap fonts and replace
  254. bitmap face names with equivalent scalable fonts
  255. -->

  256. <match target="pattern">
  257.          <test name="prefer_outline">
  258.                  <bool>true</bool>
  259.          </test>
  260.          <test name="family">
  261.                  <string>Helvetica</string>
  262.          </test>
  263.          <edit name="family" mode="prepend" binding="same">
  264.                  <string>Arial</string>
  265.          </edit>
  266. </match>

  267. <match target="pattern">
  268.          <test name="prefer_outline">
  269.                  <bool>true</bool>
  270.          </test>
  271.          <test name="family">
  272.                  <string>Times</string>
  273.          </test>
  274.          <edit name="family" mode="prepend" binding="same">
  275.                  <string>Times New Roman</string>
  276.          </edit>
  277. </match>
  278. <!--
  279.   Provide required aliases for standard names
  280. -->
  281. <alias>
  282.   <family>serif</family>
  283.   <prefer>
  284.    <family>Bitstream Vera Serif</family>
  285.    <family>Times New Roman</family>
  286.    <family>Nimbus Roman No9 L</family>
  287.    <family>Luxi Serif</family>
  288.    <family>Times</family>
  289.    <family>SimSun</family>
  290.    <family>Kochi Mincho</family>
  291.    <family>AR PL SungtiL GB</family>
  292.    <family>AR PL Mingti2L Big5</family>
  293.    <family>Baekmuk Batang</family>   
  294.   </prefer>
  295. </alias>
  296. <alias>
  297.   <family>sans-serif</family>
  298.   <prefer>
  299.    <family>Bitstream Vera Sans</family>
  300.    <family>Verdana</family>
  301.    <family>Nimbus Sans L</family>
  302.    <family>Luxi Sans</family>
  303.    <family>Arial</family>
  304.    <family>Helvetica</family>
  305.     <family>SimSun</family>
  306.    <family>Kochi Gothic</family>
  307.    <family>AR PL KaitiM GB</family>
  308.    <family>AR PL KaitiM Big5</family>
  309.    <family>Baekmuk Dotum</family>
  310.   </prefer>
  311. </alias>
  312. <alias>
  313.   <family>monospace</family>
  314.   <prefer>
  315.    <family>Bitstream Vera Sans Mono</family>
  316.    <family>Andale Mono</family>
  317.    <family>Courier New</family>
  318.    <family>Luxi Mono</family>
  319.    <family>Nimbus Mono L</family>
  320.    <family>SimSun</family>
  321.    <family>Kochi Gothic</family>
  322.    <family>AR PL KaitiM GB</family>
  323.    <family>Baekmuk Dotum</family>
  324.   </prefer>
  325. </alias>
  326. <alias>
  327.   <family>song ti</family>
  328.   <prefer>
  329.    <family>Tahoma</family>
  330.    <family>SimSun</family>
  331.   </prefer>
  332. </alias>
  333. <!--
  334. Artificial oblique for fonts without an italic or oblique version
  335. -->

  336. <match target="font">
  337.   <!-- check to see if the font is roman -->
  338.   <test name="slant">
  339.    <const>roman</const>
  340.   </test>
  341.   <!-- check to see if the pattern requested non-roman -->
  342.   <test target="pattern" name="slant" compare="not_eq">
  343.    <const>roman</const>
  344.   </test>
  345.   <!-- multiply the matrix to slant the font -->
  346.   <edit name="matrix" mode="assign">
  347.    <times>
  348.     <name>matrix</name>
  349.     <matrix><double>1</double><double>0.2</double>
  350.      <double>0</double><double>1</double>
  351.     </matrix>
  352.    </times>
  353.   </edit>
  354.   <!-- pretend the font is oblique now -->
  355.   <edit name="slant" mode="assign">
  356.    <const>oblique</const>
  357.   </edit>
  358. </match>

  359. <config>
  360. <!--
  361. Artificial bold for fonts without an bold version
  362. -->
  363.   
  364. <match target="font">
  365.   <test name="weight" compare="less_eq">
  366.    <const>medium</const>
  367.   </test>
  368.   <test target="pattern" name="weight" compare="more">
  369.    <const>medium</const>
  370.   </test>
  371.   <edit name="weight" mode="assign">
  372.    <const>bold</const>
  373.   </edit>
  374. </match>


  375. <!--
  376.   These are the default Unicode chars that are expected to be blank
  377.   in fonts.  All other blank chars are assumed to be broken and
  378.   won't appear in the resulting charsets
  379. -->
  380.   <blank>
  381.    <int>0x0020</int> <!-- SPACE -->
  382.    <int>0x00a0</int> <!-- NO-BREAK SPACE -->
  383.    <int>0x00ad</int> <!-- SOFT HYPHEN -->
  384.    <int>0x115f</int> <!-- HANGUL CHOSEONG FILLER -->
  385.    <int>0x1160</int> <!-- HANGUL JUNGSEONG FILLER -->
  386.    <int>0x1680</int> <!-- OGHAM SPACE MARK -->
  387.    <int>0x2000</int> <!-- EN QUAD -->
  388.    <int>0x2001</int> <!-- EM QUAD -->
  389.    <int>0x2002</int> <!-- EN SPACE -->
  390.    <int>0x2003</int> <!-- EM SPACE -->
  391.    <int>0x2004</int> <!-- THREE-PER-EM SPACE -->
  392.    <int>0x2005</int> <!-- FOUR-PER-EM SPACE -->
  393.    <int>0x2006</int> <!-- SIX-PER-EM SPACE -->
  394.    <int>0x2007</int> <!-- FIGURE SPACE -->
  395.    <int>0x2008</int> <!-- PUNCTUATION SPACE -->
  396.    <int>0x2009</int> <!-- THIN SPACE -->
  397.    <int>0x200a</int> <!-- HAIR SPACE -->
  398.    <int>0x200b</int> <!-- ZERO WIDTH SPACE -->
  399.    <int>0x200c</int> <!-- ZERO WIDTH NON-JOINER -->
  400.    <int>0x200d</int> <!-- ZERO WIDTH JOINER -->
  401.    <int>0x200e</int> <!-- LEFT-TO-RIGHT MARK -->
  402.    <int>0x200f</int> <!-- RIGHT-TO-LEFT MARK -->
  403.    <int>0x2028</int> <!-- LINE SEPARATOR -->
  404.    <int>0x2029</int> <!-- PARAGRAPH SEPARATOR -->
  405.    <int>0x202a</int> <!-- LEFT-TO-RIGHT EMBEDDING -->
  406.    <int>0x202b</int> <!-- RIGHT-TO-LEFT EMBEDDING -->
  407.    <int>0x202c</int> <!-- POP DIRECTIONAL FORMATTING -->
  408.    <int>0x202d</int> <!-- LEFT-TO-RIGHT OVERRIDE -->
  409.    <int>0x202e</int> <!-- RIGHT-TO-LEFT OVERRIDE -->
  410.    <int>0x202f</int> <!-- NARROW NO-BREAK SPACE -->
  411.    <int>0x205f</int> <!-- MEDIUM MATHEMATICAL SPACE -->
  412.    <int>0x2060</int> <!-- WORD JOINER -->
  413.    <int>0x2061</int> <!-- FUNCTION APPLICATION -->
  414.    <int>0x2062</int> <!-- INVISIBLE TIMES -->
  415.    <int>0x2063</int> <!-- INVISIBLE SEPARATOR -->
  416.    <int>0x206A</int> <!-- INHIBIT SYMMETRIC SWAPPING -->
  417.    <int>0x206B</int> <!-- ACTIVATE SYMMETRIC SWAPPING -->
  418.    <int>0x206C</int> <!-- INHIBIT ARABIC FORM SHAPING -->
  419.    <int>0x206D</int> <!-- ACTIVATE ARABIC FORM SHAPING -->
  420.    <int>0x206E</int> <!-- NATIONAL DIGIT SHAPES -->
  421.    <int>0x206F</int> <!-- NOMINAL DIGIT SHAPES -->
  422.    <int>0x3000</int> <!-- IDEOGRAPHIC SPACE -->
  423.    <int>0x3164</int> <!-- HANGUL FILLER -->
  424.    <int>0xfeff</int> <!-- ZERO WIDTH NO-BREAK SPACE -->
  425.    <int>0xffa0</int> <!-- HALFWIDTH HANGUL FILLER -->
  426.    <int>0xfff9</int> <!-- INTERLINEAR ANNOTATION ANCHOR -->
  427.    <int>0xfffa</int> <!-- INTERLINEAR ANNOTATION SEPARATOR -->
  428.    <int>0xfffb</int> <!-- INTERLINEAR ANNOTATION TERMINATOR -->
  429.   </blank>
  430. <!--
  431.   Rescan configuration every 30 seconds when FcFontSetList is called
  432. -->
  433.   <rescan>
  434.    <int>30</int>
  435.   </rescan>
  436. </config>

  437. </fontconfig>
复制代码


local.comf
  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- /etc/fonts/local.conf file for local customizations -->
  4. <fontconfig>
  5. <dir>/usr/share/fonts</dir>
  6. <dir>/usr/share/fonts/ttf/zh_CN</dir>
  7. <dir>/usr/share/fonts/zh_CN</dir>
  8. <dir>/usr/X11R6/lib/X11/fonts</dir>
  9. <dir>/usr/local/share/fonts</dir>

  10. <!--
  11.    Enable sub-pixel rendering
  12.   <match target="font">
  13.    <test qual="all" name="rgba">
  14.     <const>unknown</const>
  15.    </test>
  16.    <edit name="rgba" mode="assign">
  17.     <const>rgb</const>
  18.    </edit>
  19.   </match>
  20. -->

  21. <!--
  22.    Add by Firefly(firefly@firefly.idv.tw)
  23. -->
  24. <match target="font" >
  25.   <edit name="embeddedbitmap" mod="assign" >
  26.    <bool>true</bool>
  27.   </edit>
  28. </match>

  29. <!--
  30.    Add by Firefly(firefly@firefly.idv.tw)
  31.    Most of Asian fonts can't explain by freetype2,
  32.    so,if these fonts have dual width(half/full) and monospacing,
  33.    you need to disable globaladvance.
  34.   -->
  35.   
  36. <match target="font" >
  37.   <test compare="more_eq" name="spacing" >
  38.    <const>dual</const>
  39.   </test>
  40.   <edit mode="assign" name="globaladvance" >
  41.    <bool>false</bool>
  42.   </edit>
  43. </match>

  44. <!--
  45.   Add by [email]firefly@firefly.idv.tw[/email]
  46.   Artificial bold for fonts without a bold version.
  47.   -->
  48. <match target="font" >
  49.   <!-- check to see if the pattern requested > "medium" -->
  50.   <test compare="more" target="pattern" name="weight" >
  51.    <const>medium</const>
  52.   </test>
  53.   <!-- pretend the font is bold now -->
  54.   <edit mode="assign" name="weight" >
  55.    <const>bold</const>
  56.   </edit>
  57. </match>

  58. <match target="pattern" >
  59.   <test compare="eq" name="family" qual="any" >
  60.    <string>NSimSun</string>
  61.   </test>
  62.   <edit mode="prepend_first" binding="strong" name="family" >
  63.    <string>Bitstream Vera Sans</string>
  64.   </edit>
  65. </match>

  66. <!--
  67. donn't _enable_ following lines if you _donnot_ know what your are doing.
  68. -->

  69. <!--
  70. <match target="pattern" >
  71.   <test compare="eq" name="family" qual="any" >
  72.    <string>SimSun</string>
  73.   </test>
  74.   <edit mode="prepend_first" binding="strong" name="family" >
  75.    <string>Tahoma</string>
  76.   </edit>
  77. </match>
  78. -->

  79. <!--
  80. <match target="pattern" >
  81.   <test compare="eq" name="family" qual="any" >
  82.    <string>Courier New</string>
  83.   </test>
  84.   <edit mode="prepend_first" binding="strong" name="family" >
  85.    <string>Bitstream Vera Sans</string>
  86.   </edit>
  87. </match>
  88. -->

  89. <match target="pattern" >
  90.   <test compare="eq" name="family" qual="any" >
  91.    <string>AR PL Kaitim GB</string>
  92.   </test>
  93.   <edit mode="prepend_first" binding="strong" name="family" >
  94.    <string>Bitstream Vera Sans</string>
  95.   </edit>
  96. </match>

  97. <!--
  98. default settings for all fonts.
  99. -->

  100. <match target="font" >
  101.   <edit mode="assign" name="antialias" >
  102.    <bool>true</bool>
  103.   </edit>
  104.   <edit mode="assign" name="hintstyle" >
  105.    <const>hintsmedium</const>
  106.   </edit>
  107.   <edit mode="assign" name="hint" >
  108.    <bool>false</bool>
  109.   </edit>
  110.   <edit mode="assign" name="autohint" >
  111.    <bool>false</bool>
  112.   </edit>
  113. </match>


  114. <!--
  115. bingding Bitstream Vera Sans Mono to monospace
  116. -->

  117. <match target="pattern" >
  118.   <test name="family" qual="any" >
  119.    <string>monospace</string>
  120.   </test>
  121.   <edit mode="append" binding="strong" name="family" >
  122.    <string>Bitstream Vera Sans Mono</string>
  123.   </edit>

  124. </match>

  125. <!--
  126. enable autohints for non-cjk fonts.
  127. -->
  128. <match target="font" >
  129.   <test name="family" qual="any" >
  130.    <string>Bitstream Vera Sans Mono</string>
  131.    <string>Bitstream Vera Sans</string>
  132.    <string>Bitstream Vera Serif</string>
  133.    <string>monospace</string>
  134.    <string>Basemic Times</string>
  135.    <string>Bitstream Charter</string>
  136.    <string>Courier New</string>
  137.    <string>Lucida</string>
  138.    <string>Lucida Bright</string>
  139.    <string>Lucida Calligraphy</string>
  140.    <string>Lucida Console</string>
  141.    <string>Lucida Handwriting</string>
  142.    <string>Lucida Sans</string>
  143.    <string>Luxi Mono</string>
  144.    <string>Luxi Sans</string>
  145.    <string>Luxi Serif</string>
  146.    <string>Times</string>
  147.    <string>Arial</string>
  148.   </test>
  149.   <edit mode="assign" name="hint" >
  150.    <bool>false</bool>
  151.   </edit>
  152.   <edit mode="assign" name="autohint" >
  153.    <bool>true</bool>
  154.   </edit>
  155. </match>

  156. <match target="font" >
  157.   <test compare="contains" target="pattern" name="lang" >
  158.    <string>zh-cn</string>
  159.    <string>zh-tw</string>
  160.    <string>ja</string>
  161.    <string>ko</string>
  162.   </test>
  163.   <test compare="eq" name="spacing" >
  164.    <const>mono</const>
  165.   </test>
  166.   <edit mode="assign" name="globaladvance" >
  167.    <bool>false</bool>
  168.   </edit>
  169. </match>

  170. <match target="font">
  171.   <test name="family" qual="any" >
  172.    <string>SimHei</string>
  173.    <string>FZHeiTi</string>
  174.   </test>
  175.   <edit mode="assign" name="globaladvance" >
  176.    <bool>false</bool>
  177.   </edit>
  178. </match>

  179. <!--
  180.    Add by [email]firefly@firefly.idv.tw[/email]
  181. -->
  182. <match target="font" >
  183.   <test compare="contains" name="lang" >
  184.    <string>zh-cn</string>
  185.    <string>zh-tw</string>
  186.    <string>ja</string>
  187.    <string>ko</string>
  188.   </test>
  189.   <edit mode="assign" name="hint" >
  190.    <bool>true</bool>
  191.   </edit>
  192.   <edit mode="assign" name="autohint" >
  193.    <bool>false</bool>
  194.   </edit>
  195.   <edit mode="assign" name="hintstyle" >
  196.    <const>hintslight</const>
  197.   </edit>
  198.   <edit mode="assign" name="usegamma" >
  199.   <if>
  200.    <less>
  201.    <name>pixelsize</name>
  202.     <double>20</double>
  203.    </less>
  204.   </if>
  205.   <bool>false</bool>
  206.   </edit>
  207. </match>

  208. <!--
  209.   don't use antialiasing if font size is between 6 and 18.
  210.   if you prefer AA fonts, you can simply comment out the following lines.
  211.   -->

  212. <match target="font" >
  213.   <!--
  214.   <test compare="contains" name="lang" >
  215.    <string>zh-cn</string>
  216.    <string>zh-tw</string>
  217.    <string>ja</string>
  218.    <string>ko</string>
  219.   </test>
  220.   -->
  221.   <test compare="more_eq" name="size" qual="any" >
  222.    <double>6</double>
  223.   </test>
  224.   <test compare="less_eq" name="size" qual="any" >
  225.    <double>18</double>
  226.   </test>
  227.   <edit mode="assign" name="antialias" >
  228.    <bool>false</bool>
  229.   </edit>
  230. </match>


  231.   <!--
  232.   make some chinese font size not too small, if not they will look ugly.:(
  233.   -->
  234.   <match target="font" >
  235.   <test name="family" qual="any" >
  236.    <string>SimSun</string>
  237.    <string>NSimSun</string>
  238.    <string>LiSu</string>
  239.    <string>SimHei</string>
  240.    <string>FangSong_GB2312</string>
  241.    <string>KaiTi_GB2312</string>
  242.    <string>SimHei</string>
  243.   </test>
  244.   <test compare="more_eq" name="pixelsize" >
  245.    <int>9</int>
  246.   </test>
  247.   <test compare="less_eq" name="pixelsize" >
  248.    <int>12</int>
  249.   </test>
  250.   <edit compare="eq" name="pixelsize" >
  251.    <int>12</int>
  252.   </edit>
  253. </match>
  254.   
  255. <config>
  256.   <other_family>
  257.    <bool>true</bool>
  258.   </other_family>
  259. </config>

  260. </fontconfig>

复制代码
发表于 2004-10-4 22:35:37 | 显示全部楼层
我的fonts.conf:
  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- /etc/fonts/fonts.conf file to configure system font access -->
  4. <fontconfig>
  5. <!--
  6.         DO NOT EDIT THIS FILE.
  7.         IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
  8.         LOCAL CHANGES BELONG IN 'local.conf'.
  9.         The intent of this standard configuration file is to be adequate for
  10.         most environments.  If you have a reasonably normal environment and
  11.         have found problems with this configuration, they are probably
  12.         things that others will also want fixed.  Please submit any
  13.         problems to the fontconfig bugzilla system located at fontconfig.org
  14.         Note that the normal 'make install' procedure for fontconfig is to
  15.         replace any existing fonts.conf file with the new version.  Place
  16.         any local customizations in local.conf which this file references.
  17.         Keith Packard
  18. -->
  19.         <dir>/usr/X11R6/lib/X11/fonts</dir>
  20.         <dir>/usr/share/fonts</dir>
  21.         <dir>~/.fonts</dir>
  22. <!--
  23.   Accept deprecated 'mono' alias, replacing it with 'monospace'
  24. -->
  25.         <match target="pattern">
  26.                 <test qual="any" name="family">
  27.                         <string>mono</string>
  28.                 </test>
  29.                 <edit name="family" mode="assign">
  30.                         <string>monospace</string>
  31.                 </edit>
  32.         </match>
  33. <!--
  34.   Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
  35. -->
  36.         <match target="pattern">
  37.                 <test qual="any" name="family">
  38.                         <string>sans serif</string>
  39.                 </test>
  40.                 <edit name="family" mode="assign">
  41.                         <string>sans-serif</string>
  42.                 </edit>
  43.         </match>
  44. <!--
  45.   Accept deprecated 'sans' alias, replacing it with 'sans-serif'
  46. -->
  47.         <match target="pattern">
  48.                 <test qual="any" name="family">
  49.                         <string>sans</string>
  50.                 </test>
  51.                 <edit name="family" mode="assign">
  52.                         <string>sans-serif</string>
  53.                 </edit>
  54.         </match>
  55. <!--
  56.   Mark common families with their generics so we'll get
  57.   something reasonable
  58. -->
  59. <!--
  60.   Serif faces
  61. -->
  62.         <alias>
  63.                 <family>Verdana</family>
  64.                 <family>Bitstream Vera Serif</family>
  65.                 <family>SimSun</family>
  66.                 <family>Times</family>
  67.                 <family>Times New Roman</family>
  68.                 <family>Nimbus Roman No9 L</family>
  69.                 <family>Luxi Serif</family>
  70.                 <family>Kochi Mincho</family>
  71.                 <family>AR PL SungtiL GB</family>
  72.                 <family>AR PL Mingti2L Big5</family>
  73.                 <family>Baekmuk Batang</family>
  74.                 <default><family>serif</family></default>
  75.         </alias>
  76. <!--
  77.   Sans-serif faces
  78. -->
  79.         <alias>
  80.                 <family>Bitstream Vera Sans</family>
  81.                 <family>SimSun</family>
  82.                 <family>Helvetica</family>
  83.                 <family>Arial</family>
  84.                 <family>Verdana</family>
  85.                 <family>Nimbus Sans L</family>
  86.                 <family>Luxi Sans</family>
  87.                 <family>Kochi Gothic</family>
  88.                 <family>AR PL KaitiM GB</family>
  89.                 <family>AR PL KaitiM Big5</family>
  90.                 <family>Baekmuk Dotum</family>
  91.                 <default><family>sans-serif</family></default>
  92.         </alias>
  93. <!--
  94.   Monospace faces
  95. -->
  96.         <alias>
  97.                 <family>Bitstream Vera Sans Mono</family>
  98.                 <family>NSimSun</family>
  99.                 <family>Courier</family>
  100.                 <family>Courier New</family>
  101.                 <family>Andale Mono</family>
  102.                 <family>Luxi Mono</family>
  103.                 <family>Nimbus Mono L</family>
  104.                 <default><family>monospace</family></default>
  105.         </alias>
  106. <!--
  107.   If the font still has no generic name, add sans-serif
  108. -->
  109.         <match target="pattern">
  110.                 <test qual="all" name="family" compare="not_eq">
  111.                         <string>sans-serif</string>
  112.                 </test>
  113.                 <test qual="all" name="family" compare="not_eq">
  114.                         <string>serif</string>
  115.                 </test>
  116.                 <test qual="all" name="family" compare="not_eq">
  117.                         <string>monospace</string>
  118.                 </test>
  119.                 <edit name="family" mode="append_last">
  120.                         <string>sans-serif</string>
  121.                 </edit>
  122.         </match>
  123. <!--
  124.         The Bitstream Vera fonts have GASP entries suggesting that hinting be
  125.         disabled below 8 ppem, but FreeType ignores those, preferring to use
  126.         the data found in the instructed hints.  The initial Vera release
  127.         didn't include the right instructions in the 'prep' table. Fix this
  128.         by disabling hinting manually at smaller sizes (< 8ppem)
  129. -->
  130.         <match target="font">
  131.                 <test name="family">
  132.                         <string>Bitstream Vera Sans</string>
  133.                 </test>
  134.                 <test name="pixelsize" compare="less">
  135.                         <double>7.5</double>
  136.                 </test>
  137.                 <edit name="hinting">
  138.                         <bool>false</bool>
  139.                 </edit>
  140.         </match>
  141.         <match target="font">
  142.                 <test name="family">
  143.                         <string>Bitstream Vera Serif</string>
  144.                 </test>
  145.                 <test name="pixelsize" compare="less">
  146.                         <double>7.5</double>
  147.                 </test>
  148.                 <edit name="hinting">
  149.                         <bool>false</bool>
  150.                 </edit>
  151.         </match>
  152.         <match target="font">
  153.                 <test name="family">
  154.                         <string>Bitstream Vera Sans Mono</string>
  155.                 </test>
  156.                 <test name="pixelsize" compare="less">
  157.                         <double>7.5</double>
  158.                 </test>
  159.                 <edit name="hinting">
  160.                         <bool>false</bool>
  161.                 </edit>
  162.         </match>
  163. <!--
  164.   Load per-user customization file
  165. -->
  166.         <include ignore_missing="yes">~/.fonts.conf</include>
  167. <!--
  168.   Load local system customization file
  169. -->
  170.         <include ignore_missing="yes">local.conf</include>
  171. <!--
  172.   Alias well known font names to available TrueType fonts
  173. -->
  174.         <alias>
  175.                 <family>Times</family>
  176.                 <accept><family>Times New Roman</family></accept>
  177.         </alias>
  178.         <alias>
  179.                 <family>Helvetica</family>
  180.                 <accept><family>Verdana</family></accept>
  181.         </alias>
  182.         <alias>
  183.                 <family>Arial</family>
  184.                 <accept><family>Verdana</family></accept>
  185.         </alias>
  186.         <alias>
  187.                 <family>Courier</family>
  188.                 <accept><family>Courier New</family></accept>
  189.         </alias>
  190. <!--
  191. Check user preference to avoid bitmap fonts and replace
  192. bitmap face names with equivalent scalable fonts
  193. -->
  194.         <match target="pattern">
  195.                 <test name="prefer_outline">
  196.                         <bool>true</bool>
  197.                 </test>
  198.                 <test name="family">
  199.                         <string>Helvetica</string>
  200.                 </test>
  201.                 <edit name="family" mode="prepend" binding="same">
  202.                         <string>Arial</string>
  203.                 </edit>
  204.         </match>
  205.         <match target="pattern">
  206.                 <test name="prefer_outline">
  207.                         <bool>true</bool>
  208.                 </test>
  209.                 <test name="family">
  210.                         <string>Times</string>
  211.                 </test>
  212.                 <edit name="family" mode="prepend" binding="same">
  213.                         <string>Times New Roman</string>
  214.                 </edit>
  215.         </match>
  216. <!--
  217.   Provide required aliases for standard names
  218. -->
  219.         <alias>
  220.                 <family>serif</family>
  221.                 <prefer>
  222.                         <family>Bitstream Vera Serif</family>
  223.                         <family>SimSun</family>
  224.                         <family>Times New Roman</family>
  225.                         <family>Nimbus Roman No9 L</family>
  226.                         <family>Luxi Serif</family>
  227.                         <family>Times</family>
  228.                         <family>Kochi Mincho</family>
  229.                         <family>AR PL SungtiL GB</family>
  230.                         <family>AR PL Mingti2L Big5</family>
  231.                         <family>Baekmuk Batang</family>
  232.                 </prefer>
  233.         </alias>
  234.         <alias>
  235.                 <family>sans-serif</family>
  236.                 <prefer>
  237.                         <family>Bitstream Vera Sans</family>
  238.                         <family>SimSun</family>
  239.                         <family>Verdana</family>
  240.                         <family>Nimbus Sans L</family>
  241.                         <family>Luxi Sans</family>
  242.                         <family>Arial</family>
  243.                         <family>Helvetica</family>
  244.                         <family>Kochi Gothic</family>
  245.                         <family>AR PL KaitiM GB</family>
  246.                         <family>AR PL KaitiM Big5</family>
  247.                         <family>Baekmuk Dotum</family>
  248.                 </prefer>
  249.         </alias>
  250.         <alias>
  251.                 <family>monospace</family>
  252.                 <prefer>
  253.                         <family>Bitstream Vera Sans Mono</family>
  254.                         <family>NSimSun</family>
  255.                         <family>Andale Mono</family>
  256.                         <family>Courier New</family>
  257.                         <family>Luxi Mono</family>
  258.                         <family>Nimbus Mono L</family>
  259.                         <family>Kochi Gothic</family>
  260.                         <family>AR PL KaitiM GB</family>
  261.                         <family>Baekmuk Dotum</family>
  262.                 </prefer>
  263.         </alias>
  264. <!--
  265. Artificial oblique for fonts without an italic or oblique version
  266. -->
  267.         <match target="font">
  268.                 <!-- check to see if the font is roman -->
  269.                 <test name="slant">
  270.                         <const>roman</const>
  271.                 </test>
  272.                 <!-- check to see if the pattern requested non-roman -->
  273.                 <test target="pattern" name="slant" compare="not_eq">
  274.                         <const>roman</const>
  275.                 </test>
  276.                 <!-- multiply the matrix to slant the font -->
  277.                 <edit name="matrix" mode="assign">
  278.                         <times>
  279.                                 <name>matrix</name>
  280.                                 <matrix><double>1</double><double>0.2</double>
  281.                                         <double>0</double><double>1</double>
  282.                                 </matrix>
  283.                         </times>
  284.                 </edit>
  285.                 <!-- pretend the font is oblique now -->
  286.                 <edit name="slant" mode="assign">
  287.                         <const>oblique</const>
  288.                 </edit>
  289.         </match>
  290. <!--
  291. Add by [email]firefly@firefly.idv.tw[/email]
  292. Artificial bold for fonts without a bold version.
  293. -->
  294.         <match target="font">
  295.                 <!-- check to see if the pattern requested > "medium" -->
  296.                 <test target="pattern" name="weight" compare="more">
  297.                         <const>medium</const>
  298.                 </test>
  299.                 <!-- pretend the font is bold now -->
  300.                 <edit name="weight" mode="assign">
  301.                         <const>bold</const>
  302.                 </edit>
  303.         </match>
  304. <!--
  305.   Add by [email]firefly@firefly.idv.tw[/email]
  306.   Disable "Global Advance" for all mono spacing fonts.
  307. -->
  308.         <match target="font">
  309.                 <test name="spacing" compare="eq">
  310.                         <const>mono</const>
  311.                 </test>
  312.                 <edit name="globaladvance" mode="assign">
  313.                         <bool>false</bool>
  314.                 </edit>
  315.         </match>
  316. <!--
  317.   Add by [email]firefly@firefly.idv.tw[/email]
  318.   Enable "hinting & autohint" for all fonts.
  319. -->
  320.         <match target="font">
  321.                 <edit name="hinting" mode="assign">
  322.                         <bool>true</bool>
  323.                 </edit>
  324.                 <edit name="autohint" mode="assign">
  325.                         <bool>false</bool>
  326.                 </edit>
  327.         </match>
  328. <!--
  329.   Add by [email]firefly@firefly.idv.tw[/email]
  330.   If you don't want to use emdebedbitmap first.
  331.   you can set this "embed" with false.
  332.         <match target="font">
  333.                 <edit name="embed" mode="assign">
  334.                         <bool>false</bool>
  335.                 </edit>
  336.         </match>
  337. -->
  338.         <config>
  339. <!--
  340. Artificial bold for fonts without an bold version
  341. -->
  342.         <match target="font">
  343.                 <test name="weight" compare="less_eq">
  344.                         <const>medium</const>
  345.                 </test>
  346.                 <test target="pattern" name="weight" compare="more">
  347.                         <const>medium</const>
  348.                 </test>
  349.                 <edit name="weight" mode="assign">
  350.                         <const>bold</const>
  351.                 </edit>
  352.         </match>
  353. <!--
  354.   These are the default Unicode chars that are expected to be blank
  355.   in fonts.  All other blank chars are assumed to be broken and
  356.   won't appear in the resulting charsets
  357. -->
  358.                 <blank>
  359.                         <int>0x0020</int>       <!-- SPACE -->
  360.                         <int>0x00a0</int>       <!-- NO-BREAK SPACE -->
  361.                         <int>0x00ad</int>       <!-- SOFT HYPHEN -->
  362.                         <int>0x115f</int>       <!-- HANGUL CHOSEONG FILLER -->
  363.                         <int>0x1160</int>       <!-- HANGUL JUNGSEONG FILLER -->
  364.                         <int>0x1680</int>       <!-- OGHAM SPACE MARK -->
  365.                         <int>0x2000</int>       <!-- EN QUAD -->
  366.                         <int>0x2001</int>       <!-- EM QUAD -->
  367.                         <int>0x2002</int>       <!-- EN SPACE -->
  368.                         <int>0x2003</int>       <!-- EM SPACE -->
  369.                         <int>0x2004</int>       <!-- THREE-PER-EM SPACE -->
  370.                         <int>0x2005</int>       <!-- FOUR-PER-EM SPACE -->
  371.                         <int>0x2006</int>       <!-- SIX-PER-EM SPACE -->
  372.                         <int>0x2007</int>       <!-- FIGURE SPACE -->
  373.                         <int>0x2008</int>       <!-- PUNCTUATION SPACE -->
  374.                         <int>0x2009</int>       <!-- THIN SPACE -->
  375.                         <int>0x200a</int>       <!-- HAIR SPACE -->
  376.                         <int>0x200b</int>       <!-- ZERO WIDTH SPACE -->
  377.                         <int>0x200c</int>       <!-- ZERO WIDTH NON-JOINER -->
  378.                         <int>0x200d</int>       <!-- ZERO WIDTH JOINER -->
  379.                         <int>0x200e</int>       <!-- LEFT-TO-RIGHT MARK -->
  380.                         <int>0x200f</int>       <!-- RIGHT-TO-LEFT MARK -->
  381.                         <int>0x2028</int>       <!-- LINE SEPARATOR -->
  382.                         <int>0x2029</int>       <!-- PARAGRAPH SEPARATOR -->
  383.                         <int>0x202a</int>       <!-- LEFT-TO-RIGHT EMBEDDING -->
  384.                         <int>0x202b</int>       <!-- RIGHT-TO-LEFT EMBEDDING -->
  385.                         <int>0x202c</int>       <!-- POP DIRECTIONAL FORMATTING -->
  386.                         <int>0x202d</int>       <!-- LEFT-TO-RIGHT OVERRIDE -->
  387.                         <int>0x202e</int>       <!-- RIGHT-TO-LEFT OVERRIDE -->
  388.                         <int>0x202f</int>       <!-- NARROW NO-BREAK SPACE -->
  389.                         <int>0x205f</int>       <!-- MEDIUM MATHEMATICAL SPACE -->
  390.                         <int>0x2060</int>       <!-- WORD JOINER -->
  391.                         <int>0x2061</int>       <!-- FUNCTION APPLICATION -->
  392.                         <int>0x2062</int>       <!-- INVISIBLE TIMES -->
  393.                         <int>0x2063</int>       <!-- INVISIBLE SEPARATOR -->
  394.                         <int>0x206A</int>       <!-- INHIBIT SYMMETRIC SWAPPING -->
  395.                         <int>0x206B</int>       <!-- ACTIVATE SYMMETRIC SWAPPING -->
  396.                         <int>0x206C</int>       <!-- INHIBIT ARABIC FORM SHAPING -->
  397.                         <int>0x206D</int>       <!-- ACTIVATE ARABIC FORM SHAPING -->
  398.                         <int>0x206E</int>       <!-- NATIONAL DIGIT SHAPES -->
  399.                         <int>0x206F</int>       <!-- NOMINAL DIGIT SHAPES -->
  400.                         <int>0x3000</int>       <!-- IDEOGRAPHIC SPACE -->
  401.                         <int>0x3164</int>       <!-- HANGUL FILLER -->
  402.                         <int>0xfeff</int>       <!-- ZERO WIDTH NO-BREAK SPACE -->
  403.                         <int>0xffa0</int>       <!-- HALFWIDTH HANGUL FILLER -->
  404.                         <int>0xfff9</int>       <!-- INTERLINEAR ANNOTATION ANCHOR -->
  405.                         <int>0xfffa</int>       <!-- INTERLINEAR ANNOTATION SEPARATOR -->
  406.                         <int>0xfffb</int>       <!-- INTERLINEAR ANNOTATION TERMINATOR -->
  407.                 </blank>
  408. <!--
  409.   Rescan configuration every 30 seconds when FcFontSetList is called
  410. -->
  411.                 <rescan>
  412.                         <int>30</int>
  413.                 </rescan>
  414. <!--
  415.   Add by Firefly (firefly@firefly.idv.tw)
  416.   Output non English/Latin family name.
  417. -->
  418.                 <other_family>
  419.                         <bool>true</bool>
  420.                 </other_family>
  421.         </config>
  422. <!--
  423.   Enable autohint for Bitstream Vera Sans Mono only
  424. -->
  425.         <match target="font" >
  426.                 <test name="family" >
  427.                 <string>Bitstream Vera Sans Mono</string>
  428.                 </test>
  429.                 <edit name="antialias" >
  430.                         <bool>true</bool>
  431.                 </edit>
  432.                 <edit name="hinting" >
  433.                         <bool>true</bool>
  434.                 </edit>
  435.                 <edit name="autohint" >
  436.                         <bool>true</bool>
  437.                 </edit>
  438.         </match>
  439. </fontconfig>
复制代码

我的local.conf:
  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- /etc/fonts/local.conf file for local customizations -->
  4. <fontconfig>
  5. <!--
  6.   Enable sub-pixel rendering
  7.         <match target="font">
  8.                 <test qual="all" name="rgba">
  9.                         <const>unknown</const>
  10.                 </test>
  11.                 <edit name="rgba" mode="assign"><const>rgb</const></edit>
  12.         </match>
  13. -->
  14. <dir>/usr/share/fonts/myfonts</dir>
  15. </fontconfig>
复制代码
发表于 2004-10-5 01:06:00 | 显示全部楼层
留名,以后备用
发表于 2004-10-5 07:52:11 | 显示全部楼层
有HauserMM在,我就不贴了
发表于 2004-10-5 11:25:26 | 显示全部楼层
我的也是 copy Hauser 的
发表于 2004-10-5 11:27:14 | 显示全部楼层
贴fonts.conf的同时再贴上截图吧。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表