LinuxSir.cn,穿越时空的Linuxsir!

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

[请教]如何强制所有网页字体调用雅黑?[解决]

[复制链接]
发表于 2006-12-6 18:46:32 | 显示全部楼层 |阅读模式
其他好像都没问题,偏偏就我的bjblog系统可能强制调用sans,导致字体非常恐怖。虽然可以用.fonts.conf来指定sans的真实字体,但是由于一个bug,可能情况更糟,realplay、mplayer-bin、googleearth这类非原生64位软件一旦启动,cpu就100%;不用.fonts.conf就没有问题。
所以,现在两个方案都可以解决问题:
1.用另外的办法指定sans
2.强制firefox指定雅黑为所有网页字体

谢谢

本帖子中包含更多资源

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

x
 楼主| 发表于 2006-12-6 20:59:50 | 显示全部楼层
emule类包的某个库文件过老导致非原生64位软件运行出warning的bug,居然被遗忘了!!好在有人打了个包,替换即可,这样顺带也解决了cpu 100%的问题,可以照样使用.fonts.conf了。
具有讽刺意味的是:这个包为了修正warning的,但是在我这里出了另一个warning,好在不会再影响软件运行了。

原文链接:http://forums.gentoo.org/viewtopic-t-504906-highlight-.html
包:http://cafarelli.fr/gentoo/fontconfig-emul-x86-2.4.1.tar.gz
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-6 21:43:03 | 显示全部楼层
可能是我的.fonts.conf有错导致这个问题,请大家看看
  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- /etc/fonts/fonts.conf file to configure system font access --><fontconfig>
  4. <!--
  5.         DO NOT EDIT THIS FILE.
  6.         IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
  7.         LOCAL CHANGES BELONG IN 'local.conf'.
  8.         The intent of this standard configuration file is to be adequate for
  9.         most environments.  If you have a reasonably normal environment and
  10.         have found problems with this configuration, they are probably
  11.         things that others will also want fixed.  Please submit any
  12.         problems to the fontconfig bugzilla system located at fontconfig.org
  13.         Note that the normal 'make install' procedure for fontconfig is to
  14.         replace any existing fonts.conf file with the new version.  Place
  15.         any local customizations in local.conf which this file references.
  16.         Keith Packard
  17. --><!-- Font directory list --> <dir>/usr/share/fonts</dir>
  18. <dir>/usr/local/share/fonts</dir>
  19. <dir>/usr/X11R6/lib/X11/fonts</dir>
  20. <dir>~/.fonts</dir>
  21. <!--
  22.   Accept deprecated 'mono' alias, replacing it with 'monospace'
  23. --> <match target="pattern" >
  24.   <test name="family" qual="any" >
  25.    <string>mono</string>
  26.   </test>
  27.   <edit mode="assign" name="family" >
  28.    <string>monospace</string>
  29.   </edit>
  30. </match>
  31. <!--
  32.   Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
  33. --> <match target="pattern" >
  34.   <test name="family" qual="any" >
  35.    <string>sans serif</string>
  36.   </test>
  37.   <edit mode="assign" name="family" >
  38.    <string>sans-serif</string>
  39.   </edit>
  40. </match>
  41. <!--
  42.   Accept deprecated 'sans' alias, replacing it with 'sans-serif'
  43. --> <match target="pattern" >
  44.   <test name="family" qual="any" >
  45.    <string>sans</string>
  46.   </test>
  47.   <edit mode="assign" name="family" >
  48.    <string>sans-serif</string>
  49.   </edit>
  50. </match>
  51. <!--
  52.   Mark common families with their generics so we'll get
  53.   something reasonable
  54. --><!--
  55.   Serif faces
  56. --> <alias>
  57.   <family>Microsoft YaHei</family>
  58.   <family>Bitstream Vera Serif</family>
  59.   <family>Times New Roman</family>
  60.   <family>Thorndale AMT</family>
  61.   <family>Times</family>
  62.   <family>Nimbus Roman No9 L</family>
  63.   <family>Luxi Serif</family>
  64.   <family>Kochi Mincho</family>
  65.   <family>AR PL SungtiL GB</family>
  66.   <family>AR PL Mingti2L Big5</family>
  67.   <family>MS 明朝</family>
  68.   <family>Baekmuk Batang</family>
  69.   <family>FreeSerif</family>
  70.   <default>
  71.    <family>serif</family>
  72.   </default>
  73. </alias>
  74. <!--
  75.   Sans-serif faces
  76. --> <alias>
  77.   <family>Microsoft YaHei</family>
  78.   <family>Bitstream Vera Sans</family>
  79.   <family>Helvetica</family>
  80.   <family>Arial</family>
  81.   <family>Verdana</family>
  82.   <family>Albany AMT</family>
  83.   <family>Nimbus Sans L</family>
  84.   <family>Luxi Sans</family>
  85.   <family>Kochi Gothic</family>
  86.   <family>AR PL KaitiM GB</family>
  87.   <family>AR PL KaitiM Big5</family>
  88.   <family>MS ゴシック</family>
  89.   <family>Baekmuk Dotum</family>
  90.   <family>SimSun</family>
  91.   <family>FreeSans</family>
  92.   <default>
  93.    <family>sans-serif</family>
  94.   </default>
  95. </alias>
  96. <!--
  97.   Monospace faces
  98. --> <alias>
  99.   <family>Microsoft YaHei</family>
  100.   <family>Bitstream Vera Sans Mono</family>
  101.   <family>WenQuanYi Bitmap Song</family>
  102.   <family>Courier</family>
  103.   <family>Courier New</family>
  104.   <family>Andale Mono</family>
  105.   <family>Luxi Mono</family>
  106.   <family>Cumberland AMT</family>
  107.   <family>Nimbus Mono L</family>
  108.   <family>NSimSun</family>
  109.   <family>FreeMono</family>
  110.   <default>
  111.    <family>monospace</family>
  112.   </default>
  113. </alias>
  114. <!--
  115.   If the font still has no generic name, add sans-serif
  116. --> <match target="pattern" >
  117.   <test compare="not_eq" name="family" qual="all" >
  118.    <string>sans-serif</string>
  119.   </test>
  120.   <test compare="not_eq" name="family" qual="all" >
  121.    <string>serif</string>
  122.   </test>
  123.   <test compare="not_eq" name="family" qual="all" >
  124.    <string>monospace</string>
  125.   </test>
  126.   <edit mode="append_last" name="family" >
  127.    <string>sans-serif</string>
  128.   </edit>
  129. </match>
  130. <!--
  131.   URW provides metric and shape compatible fonts for these 3 Adobe families.
  132.   --> <alias>
  133.   <family>Times</family>
  134.   <accept>
  135.    <family>Nimbus Roman No9 L</family>
  136.   </accept>
  137. </alias>
  138. <alias>
  139.   <family>Helvetica</family>
  140.   <accept>
  141.    <family>Nimbus Sans L</family>
  142.   </accept>
  143. </alias>
  144. <alias>
  145.   <family>Courier</family>
  146.   <accept>
  147.    <family>Nimbus Mono L</family>
  148.   </accept>
  149. </alias>
  150. <!--
  151. AMT provides metric and shape compatible fonts for these three web font
  152. families.
  153. --> <alias>
  154.   <family>Times New Roman</family>
  155.   <accept>
  156.    <family>Thorndale AMT</family>
  157.   </accept>
  158. </alias>
  159. <alias>
  160.   <family>Arial</family>
  161.   <accept>
  162.    <family>Albany AMT</family>
  163.   </accept>
  164. </alias>
  165. <alias>
  166.   <family>Courier New</family>
  167.   <accept>
  168.    <family>Cumberland AMT</family>
  169.   </accept>
  170. </alias>
  171. <!--
  172.   Some Asian fonts misadvertise themselves as monospaced when
  173.   in fact they are dual-spaced (half and full).  This makes
  174.   FreeType very confused as it forces all widths to match.
  175.   Undo this magic by disabling the width forcing code --> <match target="font" >
  176.   <test name="family" >
  177.    <string>GulimChe</string>
  178.   </test>
  179.   <edit name="globaladvance" >
  180.    <bool>false</bool>
  181.   </edit>
  182. </match>
  183. <match target="font" >
  184.   <test name="family" >
  185.    <string>DotumChe</string>
  186.   </test>
  187.   <edit name="globaladvance" >
  188.    <bool>false</bool>
  189.   </edit>
  190. </match>
  191. <match target="font" >
  192.   <test name="family" >
  193.    <string>BatangChe</string>
  194.   </test>
  195.   <edit name="globaladvance" >
  196.    <bool>false</bool>
  197.   </edit>
  198. </match>
  199. <match target="font" >
  200.   <test name="family" >
  201.    <string>GungsuhChe</string>
  202.   </test>
  203.   <edit name="globaladvance" >
  204.    <bool>false</bool>
  205.   </edit>
  206. </match>
  207. <!--
  208.         The Bitstream Vera fonts have GASP entries suggesting that hinting be
  209.         disabled below 8 ppem, but FreeType ignores those, preferring to use
  210.         the data found in the instructed hints.  The initial Vera release
  211.         didn't include the right instructions in the 'prep' table. Fix this
  212.         by disabling hinting manually at smaller sizes (< 8ppem)
  213. --> <match target="font" >
  214.   <test name="family" >
  215.    <string>Bitstream Vera Sans</string>
  216.   </test>
  217.   <test compare="less" name="pixelsize" >
  218.    <double>7.5</double>
  219.   </test>
  220.   <edit name="hinting" >
  221.    <bool>false</bool>
  222.   </edit>
  223. </match>
  224. <match target="font" >
  225.   <test name="family" >
  226.    <string>Bitstream Vera Serif</string>
  227.   </test>
  228.   <test compare="less" name="pixelsize" >
  229.    <double>7.5</double>
  230.   </test>
  231.   <edit name="hinting" >
  232.    <bool>false</bool>
  233.   </edit>
  234. </match>
  235. <match target="font" >
  236.   <test name="family" >
  237.    <string>Bitstream Vera Sans Mono</string>
  238.   </test>
  239.   <test compare="less" name="pixelsize" >
  240.    <double>7.5</double>
  241.   </test>
  242.   <edit name="hinting" >
  243.    <bool>false</bool>
  244.   </edit>
  245. </match>
  246. <!--
  247.   Load per-user customization file
  248. --> <include ignore_missing="yes" >~/.fonts.conf</include>
  249. <!--
  250.   Load local system customization file
  251. --> <include ignore_missing="yes" >conf.d</include>
  252. <include ignore_missing="yes" >local.conf</include>
  253. <!--
  254.   Provide required aliases for standard names
  255. --> <alias>
  256.   <family>serif</family>
  257.   <prefer>
  258.    <family>Microsoft YaHei</family>
  259.    <family>Bitstream Vera Serif</family>
  260.    <family>Times New Roman</family>
  261.    <family>Thorndale AMT</family>
  262.    <family>Luxi Serif</family>
  263.    <family>Nimbus Roman No9 L</family>
  264.    <family>Times</family>
  265.    <family>Frank Ruehl</family>
  266.    <family>Kochi Mincho</family>
  267.    <family>AR PL SungtiL GB</family>
  268.    <family>AR PL Mingti2L Big5</family>
  269.    <family>MS 明朝</family>
  270.    <family>Baekmuk Batang</family>
  271.    <family>FreeSerif</family>
  272.   </prefer>
  273. </alias>
  274. <alias>
  275.   <family>sans-serif</family>
  276.   <prefer>
  277.    <family>Microsoft YaHei</family>
  278.    <family>Bitstream Vera Sans</family>
  279.    <family>Verdana</family>
  280.    <family>Arial</family>
  281.    <family>Albany AMT</family>
  282.    <family>Luxi Sans</family>
  283.    <family>Nimbus Sans L</family>
  284.    <family>Helvetica</family>
  285.    <family>Nachlieli</family>
  286.    <family>Kochi Gothic</family>
  287.    <family>AR PL KaitiM GB</family>
  288.    <family>AR PL KaitiM Big5</family>
  289.    <family>MS ゴシック</family>
  290.    <family>Baekmuk Dotum</family>
  291.    <family>SimSun</family>
  292.    <family>FreeSans</family>
  293.   </prefer>
  294. </alias>
  295. <alias>
  296.   <family>monospace</family>
  297.   <prefer>
  298.    <family>Microsoft YaHei</family>
  299.    <family>Bitstream Vera Sans Mono</family>
  300.    <family>Andale Mono</family>
  301.    <family>Courier New</family>
  302.    <family>Cumberland AMT</family>
  303.    <family>Luxi Mono</family>
  304.    <family>Nimbus Mono L</family>
  305.    <family>Courier</family>
  306.    <family>Miriam Mono</family>
  307.    <family>Kochi Gothic</family>
  308.    <family>AR PL KaitiM GB</family>
  309.    <family>Baekmuk Dotum</family>
  310.    <family>FreeMono</family>
  311.   </prefer>
  312. </alias>
  313. <!--
  314. Suitable free alias for Symbol font
  315. --> <alias>
  316.   <family>Symbol</family>
  317.   <accept>
  318.    <family>Standard Symbols L</family>
  319.   </accept>
  320. </alias>
  321. <alias>
  322.   <family>ZapfDingbats</family>
  323.   <accept>
  324.    <family>Dingbats</family>
  325.   </accept>
  326. </alias>
  327. <!--
  328. Artificial oblique for fonts without an italic or oblique version
  329. --> <match target="font" >
  330. <!-- check to see if the font is roman -->  <test name="slant" >
  331.    <const>roman</const>
  332.   </test>
  333. <!-- check to see if the pattern requested non-roman -->  <test compare="not_eq" target="pattern" name="slant" >
  334.    <const>roman</const>
  335.   </test>
  336. <!-- multiply the matrix to slant the font -->  <edit mode="assign" name="matrix" >
  337.    <times>
  338.     <name>matrix</name>
  339.     <matrix>
  340.      <double>1</double>
  341.      <double>0.2</double>
  342.      <double>0</double>
  343.      <double>1</double>
  344.     </matrix>
  345.    </times>
  346.   </edit>
  347. <!-- pretend the font is oblique now -->  <edit mode="assign" name="slant" >
  348.    <const>oblique</const>
  349.   </edit>
  350. </match>
  351. <!--
  352. Synthetic emboldening for fonts that do not have bold face available
  353. --> <match target="font" >
  354. <!-- check to see if the font is just regular -->  <test compare="less_eq" name="weight" >
  355.    <int>100</int>
  356.   </test>
  357. <!-- check to see if the pattern requests bold -->  <test compare="more_eq" target="pattern" name="weight" >
  358.    <int>200</int>
  359.   </test>
  360. <!-- set the embolden flag -->  <edit mode="assign" name="embolden" >
  361.    <bool>true</bool>
  362.   </edit>
  363. </match>
  364. <config>
  365. <!--
  366.   These are the default Unicode chars that are expected to be blank
  367.   in fonts.  All other blank chars are assumed to be broken and
  368.   won't appear in the resulting charsets
  369. -->  <blank>
  370.    <int>0x0020</int>
  371. <!-- SPACE -->   <int>0x00A0</int>
  372. <!-- NO-BREAK SPACE -->   <int>0x00AD</int>
  373. <!-- SOFT HYPHEN -->   <int>0x034F</int>
  374. <!-- COMBINING GRAPHEME JOINER -->   <int>0x0600</int>
  375. <!-- ARABIC NUMBER SIGN -->   <int>0x0601</int>
  376. <!-- ARABIC SIGN SANAH -->   <int>0x0602</int>
  377. <!-- ARABIC FOOTNOTE MARKER -->   <int>0x0603</int>
  378. <!-- ARABIC SIGN SAFHA -->   <int>0x06DD</int>
  379. <!-- ARABIC END OF AYAH -->   <int>0x070F</int>
  380. <!-- SYRIAC ABBREVIATION MARK -->   <int>0x115F</int>
  381. <!-- HANGUL CHOSEONG FILLER -->   <int>0x1160</int>
  382. <!-- HANGUL JUNGSEONG FILLER -->   <int>0x1680</int>
  383. <!-- OGHAM SPACE MARK -->   <int>0x17B4</int>
  384. <!-- KHMER VOWEL INHERENT AQ -->   <int>0x17B5</int>
  385. <!-- KHMER VOWEL INHERENT AA -->   <int>0x180E</int>
  386. <!-- MONGOLIAN VOWEL SEPARATOR -->   <int>0x2000</int>
  387. <!-- EN QUAD -->   <int>0x2001</int>
  388. <!-- EM QUAD -->   <int>0x2002</int>
  389. <!-- EN SPACE -->   <int>0x2003</int>
  390. <!-- EM SPACE -->   <int>0x2004</int>
  391. <!-- THREE-PER-EM SPACE -->   <int>0x2005</int>
  392. <!-- FOUR-PER-EM SPACE -->   <int>0x2006</int>
  393. <!-- SIX-PER-EM SPACE -->   <int>0x2007</int>
  394. <!-- FIGURE SPACE -->   <int>0x2008</int>
  395. <!-- PUNCTUATION SPACE -->   <int>0x2009</int>
  396. <!-- THIN SPACE -->   <int>0x200A</int>
  397. <!-- HAIR SPACE -->   <int>0x200B</int>
  398. <!-- ZERO WIDTH SPACE -->   <int>0x200C</int>
  399. <!-- ZERO WIDTH NON-JOINER -->   <int>0x200D</int>
  400. <!-- ZERO WIDTH JOINER -->   <int>0x200E</int>
  401. <!-- LEFT-TO-RIGHT MARK -->   <int>0x200F</int>
  402. <!-- RIGHT-TO-LEFT MARK -->   <int>0x2028</int>
  403. <!-- LINE SEPARATOR -->   <int>0x2029</int>
  404. <!-- PARAGRAPH SEPARATOR -->   <int>0x202A</int>
  405. <!-- LEFT-TO-RIGHT EMBEDDING -->   <int>0x202B</int>
  406. <!-- RIGHT-TO-LEFT EMBEDDING -->   <int>0x202C</int>
  407. <!-- POP DIRECTIONAL FORMATTING -->   <int>0x202D</int>
  408. <!-- LEFT-TO-RIGHT OVERRIDE -->   <int>0x202E</int>
  409. <!-- RIGHT-TO-LEFT OVERRIDE -->   <int>0x202F</int>
  410. <!-- NARROW NO-BREAK SPACE -->   <int>0x205F</int>
  411. <!-- MEDIUM MATHEMATICAL SPACE -->   <int>0x2060</int>
  412. <!-- WORD JOINER -->   <int>0x2061</int>
  413. <!-- FUNCTION APPLICATION -->   <int>0x2062</int>
  414. <!-- INVISIBLE TIMES -->   <int>0x2063</int>
  415. <!-- INVISIBLE SEPARATOR -->   <int>0x206A</int>
  416. <!-- INHIBIT SYMMETRIC SWAPPING -->   <int>0x206B</int>
  417. <!-- ACTIVATE SYMMETRIC SWAPPING -->   <int>0x206C</int>
  418. <!-- INHIBIT ARABIC FORM SHAPING -->   <int>0x206D</int>
  419. <!-- ACTIVATE ARABIC FORM SHAPING -->   <int>0x206E</int>
  420. <!-- NATIONAL DIGIT SHAPES -->   <int>0x206F</int>
  421. <!-- NOMINAL DIGIT SHAPES -->   <int>0x3000</int>
  422. <!-- IDEOGRAPHIC SPACE -->   <int>0x3164</int>
  423. <!-- HANGUL FILLER -->   <int>0xFEFF</int>
  424. <!-- ZERO WIDTH NO-BREAK SPACE -->   <int>0xFFA0</int>
  425. <!-- HALFWIDTH HANGUL FILLER -->   <int>0xFFF9</int>
  426. <!-- INTERLINEAR ANNOTATION ANCHOR -->   <int>0xFFFA</int>
  427. <!-- INTERLINEAR ANNOTATION SEPARATOR -->   <int>0xFFFB</int>
  428. <!-- INTERLINEAR ANNOTATION TERMINATOR -->  </blank>
  429. <!--
  430.   Rescan configuration every 30 seconds when FcFontSetList is called
  431. -->  <rescan>
  432.    <int>30</int>
  433.   </rescan>
  434. </config>
  435. <match target="font" >
  436.   <edit mode="assign" name="rgba" >
  437.    <const>none</const>
  438.   </edit>
  439. </match>
  440. <match target="font" >
  441.   <edit mode="assign" name="hinting" >
  442.    <bool>true</bool>
  443.   </edit>
  444. </match>
  445. <match target="font" >
  446.   <edit mode="assign" name="hintstyle" >
  447.    <const>hintmedium</const>
  448.   </edit>
  449. </match>
  450. <match target="font" >
  451.   <edit mode="assign" name="antialias" >
  452.    <bool>true</bool>
  453.   </edit>
  454. </match>
  455. </fontconfig>
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-12-7 09:09:29 | 显示全部楼层
如何解决, 说说看
回复 支持 反对

使用道具 举报

发表于 2006-12-7 09:30:29 | 显示全部楼层
mplayer用源码自己编译应该又64为了吧.为什么还用bin呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-7 11:57:50 | 显示全部楼层
Post by Yuri
mplayer用源码自己编译应该又64为了吧.为什么还用bin呢?
当然是有原因的。编译的mplayer没办法播放某些wmv格式。因为real用不了,只能用字符界面启动的-bin来播放rmvb,字符启动的-bin不受bug影响,因为不会调用字体。

to clsjz:
把下载的包里的东西解压出来覆盖到相应目录即可,再运行下ldconfig
回复 支持 反对

使用道具 举报

发表于 2006-12-7 12:52:37 | 显示全部楼层
Post by 三翻领
当然是有原因的。编译的mplayer没办法播放某些wmv格式。因为real用不了,只能用字符界面启动的-bin来播放rmvb,字符启动的-bin不受bug影响,因为不会调用字体。

to clsjz:
把下载的包里的东西解压出来覆盖到相应目录即可,再运行下ldconfig


64位的MPLAYER可以支持REAL了。
http://www.linuxsir.cn/bbs/showthread.php?t=283894
回复 支持 反对

使用道具 举报

发表于 2006-12-7 13:44:15 | 显示全部楼层
字体同样是万年老问题……不知道Linux进入历史博物馆的时候能不能解决……
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-7 13:53:18 | 显示全部楼层
今天玩tahoma了,果然不错,conky显示漂亮多了
回复 支持 反对

使用道具 举报

发表于 2006-12-7 14:05:37 | 显示全部楼层
tahoma有什么好玩的……现在要玩segoeui……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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