LinuxSir.cn,穿越时空的Linuxsir!

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

提供一个较好的firefox字体显示偏方

[复制链接]
发表于 2004-10-30 15:16:34 | 显示全部楼层 |阅读模式
1.替换我的fonts.conf,使得firefox菜单字体不再模糊,同时不影响系统本身的字体显示效果。

  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 Tue Apr 22 16:09:12 EDT 2003 -->

  20. <dir>/usr/share/fonts</dir>
  21. <dir>~/.fonts</dir>

  22. <!--
  23. *Set alias start*
  24. -->

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

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

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

  58. <!--
  59. Mark common families with their generics so we'll get
  60. something reasonable
  61. -->

  62. <!--
  63. * Set alias END*
  64. -->

  65. <!--
  66. *Define three font-sets: Sans-serif,Sans,Monospace*
  67. -->
  68. <!--
  69. Serif faces
  70. -->
  71. <alias>
  72. <family>Bitstream Vera Serif</family>
  73. <family>Tahoma</family>
  74. <family>Simsun</family>
  75. <family>Times</family>
  76. <family>Times New Roman</family>
  77. <family>Nimbus Roman No9 L</family>
  78. <family>Luxi Serif</family>
  79. <family>Mingliu</family>
  80. <family>Kochi Mincho</family>
  81. <family>AR PL SungtiL GB</family>
  82. <family>AR PL Mingti2L Big5</family>
  83. <family>Baekmuk Batang</family>
  84. <default><family>serif</family></default>
  85. </alias>
  86. <!--
  87. Sans-serif faces
  88. -->
  89. <alias>
  90. <family>Bitstream Vera Sans</family>
  91. <family>Helvetica</family>
  92. <family>Arial</family>
  93. <family>Verdana</family>
  94. <family>Nimbus Sans L</family>
  95. <family>Luxi Sans</family>
  96. <family>Tahoma</family>
  97. <family>Simsun</family>
  98. <family>Mingliu</family>
  99. <family>Kochi Gothic</family>
  100. <family>AR PL KaitiM GB</family>
  101. <family>AR PL KaitiM Big5</family>
  102. <family>Baekmuk Dotum</family>
  103. <default><family>sans-serif</family></default>
  104. </alias>
  105. <!--
  106. Monospace faces
  107. -->
  108. <alias>
  109. <family>Bitstream Vera Sans Mono</family>
  110. <family>Courier</family>
  111. <family>Courier New</family>
  112. <family>Andale Mono</family>
  113. <family>Luxi Mono</family>
  114. <family>Nimbus Mono L</family>
  115. <family>NSimSun</family>
  116. <family>PMingLiu</family>
  117. <default><family>monospace</family></default>
  118. </alias>

  119. <!--
  120. If the font still has no generic name, add sans-serif
  121. -->
  122. <match target="pattern">
  123. <test qual="all" name="family" compare="not_eq">
  124. <string>sans-serif</string>
  125. </test>
  126. <test qual="all" name="family" compare="not_eq">
  127. <string>serif</string>
  128. </test>
  129. <test qual="all" name="family" compare="not_eq">
  130. <string>monospace</string>
  131. </test>
  132. <edit name="family" mode="append_last">
  133. <string>sans-serif</string>
  134. </edit>
  135. </match>

  136. <!--
  137. Some Asian fonts misadvertise themselves as monospaced when
  138. in fact they are dual-spaced (half and full). This makes
  139. FreeType very confused as it forces all widths to match.
  140. Undo this magic by disabling the width forcing code -->
  141. <match target="font">
  142. <test name="family"><string>GulimChe</string></test>
  143. <edit name="globaladvance"><bool>false</bool></edit>
  144. </match>

  145. <match target="font">
  146. <test name="family"><string>DotumChe</string></test>
  147. <edit name="globaladvance"><bool>false</bool></edit>
  148. </match>

  149. <match target="font">
  150. <test name="family"><string>BatangChe</string></test>
  151. <edit name="globaladvance"><bool>false</bool></edit>
  152. </match>

  153. <match target="font">
  154. <test name="family"><string>GungsuhChe</string></test>
  155. <edit name="globaladvance"><bool>false</bool></edit>
  156. </match>

  157. <!--
  158. The Bitstream Vera fonts have GASP entries suggesting that hinting be
  159. disabled below 8 ppem, but FreeType ignores those, preferring to use
  160. the data found in the instructed hints. The initial Vera release
  161. didn't include the right instructions in the 'prep' table. Fix this
  162. by disabling hinting manually at smaller sizes (< 8ppem)
  163. -->

  164. <match target="font">
  165. <test name="family">
  166. <string>Bitstream Vera Sans</string>
  167. </test>
  168. <test name="pixelsize" compare="less">
  169. <double>7.5</double>
  170. </test>
  171. <edit name="hinting">
  172. <bool>false</bool>
  173. </edit>
  174. </match>

  175. <match target="font">
  176. <test name="family">
  177. <string>Bitstream Vera Serif</string>
  178. </test>
  179. <test name="pixelsize" compare="less">
  180. <double>7.5</double>
  181. </test>
  182. <edit name="hinting">
  183. <bool>false</bool>
  184. </edit>
  185. </match>

  186. <match target="font">
  187. <test name="family">
  188. <string>Bitstream Vera Sans Mono</string>
  189. </test>
  190. <test name="pixelsize" compare="less">
  191. <double>7.5</double>
  192. </test>
  193. <edit name="hinting">
  194. <bool>false</bool>
  195. </edit>
  196. </match>

  197. <!--
  198. Load per-user customization file
  199. -->
  200. <include ignore_missing="yes">~/.fonts.conf</include>

  201. <!--
  202. Load local system customization file
  203. -->
  204. <include ignore_missing="yes">local.conf</include>

  205. <!--
  206. Alias well known font names to available TrueType fonts
  207. -->
  208. <alias>
  209. <family>Times</family>
  210. <accept><family>Times New Roman</family></accept>
  211. </alias>
  212. <alias>
  213. <family>Helvetica</family>
  214. <accept><family>Verdana</family></accept>
  215. </alias>
  216. <alias>
  217. <family>Arial</family>
  218. <accept><family>Verdana</family></accept>
  219. </alias>
  220. <alias>
  221. <family>Courier</family>
  222. <accept><family>Courier New</family></accept>
  223. </alias>

  224. <!--
  225. Check user preference to avoid bitmap fonts and replace
  226. bitmap face names with equivalent scalable fonts
  227. -->

  228. <match target="pattern">
  229. <test name="prefer_outline">
  230. <bool>true</bool>
  231. </test>
  232. <test name="family">
  233. <string>Helvetica</string>
  234. </test>
  235. <edit name="family" mode="prepend" binding="same">
  236. <string>Arial</string>
  237. </edit>
  238. </match>

  239. <match target="pattern">
  240. <test name="prefer_outline">
  241. <bool>true</bool>
  242. </test>
  243. <test name="family">
  244. <string>Times</string>
  245. </test>
  246. <edit name="family" mode="prepend" binding="same">
  247. <string>Times New Roman</string>
  248. </edit>
  249. </match>
  250. <!--
  251. Provide required aliases for standard names
  252. -->
  253. <alias>
  254. <family>serif</family>
  255. <prefer>
  256. <family>Bitstream Vera Serif</family>
  257. <family>Times New Roman</family>
  258. <family>Nimbus Roman No9 L</family>
  259. <family>Luxi Serif</family>
  260. <family>Times</family>
  261. <family>Simsun</family>
  262. <family>Mingliu</family>
  263. <family>Kochi Mincho</family>
  264. <family>AR PL SungtiL GB</family>
  265. <family>AR PL Mingti2L Big5</family>
  266. <family>Baekmuk Batang</family>
  267. </prefer>
  268. </alias>
  269. <alias>
  270. <family>sans-serif</family>
  271. <prefer>
  272. <family>Bitstream Vera Sans</family>
  273. <family>Verdana</family>
  274. <family>Nimbus Sans L</family>
  275. <family>Luxi Sans</family>
  276. <family>Tahoma</family>
  277. <family>Simsun</family>
  278. <family>Mingliu</family>
  279. <family>Arial</family>
  280. <family>Helvetica</family>
  281. <family>Kochi Gothic</family>
  282. <family>AR PL KaitiM GB</family>
  283. <family>AR PL KaitiM Big5</family>
  284. <family>Baekmuk Dotum</family>
  285. </prefer>
  286. </alias>
  287. <alias>
  288. <family>monospace</family>
  289. <prefer>
  290. <family>Bitstream Vera Sans Mono</family>
  291. <family>Andale Mono</family>
  292. <family>Courier New</family>
  293. <family>Luxi Mono</family>
  294. <family>Nimbus Mono L</family>
  295. <family>SimSun</family>
  296. <family>NSimSun</family>
  297. <family>PMingLiu</family>
  298. <family>Kochi Gothic</family>
  299. <family>AR PL KaitiM GB</family>
  300. <family>Baekmuk Dotum</family>
  301. </prefer>
  302. </alias>

  303. <!--
  304. Artificial oblique for fonts without an italic or oblique version
  305. -->

  306. <match target="font">
  307. <!-- check to see if the font is roman -->
  308. <test name="slant">
  309. <const>roman</const>
  310. </test>
  311. <!-- check to see if the pattern requested non-roman -->
  312. <test target="pattern" name="slant" compare="not_eq">
  313. <const>roman</const>
  314. </test>
  315. <!-- multiply the matrix to slant the font -->
  316. <edit name="matrix" mode="assign">
  317. <times>
  318. <name>matrix</name>
  319. <matrix><double>1</double><double>0.2</double>
  320. <double>0</double><double>1</double>
  321. </matrix>
  322. </times>
  323. </edit>
  324. <!-- pretend the font is oblique now -->
  325. <edit name="slant" mode="assign">
  326. <const>oblique</const>
  327. </edit>
  328. </match>
  329. <!--
  330. This expression is added by Akito Hirai<akito@kde.gr.jp> for convenience.
  331. It can be used to make artificial bold versions in client libraries/applications.
  332. -->
  333. <match target="font">
  334. <test name="weight">
  335. <const>medium</const>
  336. </test>
  337. <test target="pattern" name="weight" compare="more">
  338. <const>medium</const>
  339. </test>
  340. <edit name="weight" mode="assign">
  341. <if>
  342. <more>
  343. <name>spacing</name>
  344. <const>proportional</const>
  345. </more>
  346. <const>demibold</const> <!-- for monospace -->
  347. <const>bold</const> <!-- for proportional -->
  348. </if>
  349. </edit>
  350. </match>

  351. <match target="font">
  352. <test name="pixelsize" compare="less_eq">
  353. <double>16</double>
  354. </test>
  355. <test name="pixelsize" compare="more_eq">
  356. <double>8</double>
  357. </test>
  358. <edit name="antialias" mode="assign">
  359. <bool>f</bool>
  360. </edit>
  361. </match>
  362. <match target="font">
  363. <test name="size" compare="less_eq">
  364. <double>16</double>
  365. </test>
  366. <test name="size" compare="more_eq">
  367. <double>8</double>
  368. </test>

  369. <edit name="antialias" mode="assign">
  370. <bool>f</bool>
  371. </edit>
  372. </match>

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

  436. </fontconfig>
复制代码


2.firefox字体设置如下:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2004-10-30 15:19:28 | 显示全部楼层
这样,firefox在显示linuxsir这类css不好的网页,也使用tahoma来显示英文字体,效果极好,感觉舒服。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2004-10-30 17:16:39 | 显示全部楼层
对我完全不适用呢。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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