您现在的位置: 中国IT实验室 >> IBM >> 学习教程 >> 文章正文
在mozilla下实现Windows字体替换

ChinaITLab 收集整理  2004-7-16  保存本文  推荐给好友  QQ上看本站  收藏本站



  在所贴的Mozilla撷图中,包括了几款字体:
  Times New Roman, mingliu.ttc, simhei.ttf ,kaiu.ttf
  一般都可在Windows 中找到;
  当然亦可用:
  Tahoma, simsun.ttc, simhei ,kaiu.ttf.
  将字体放到 fonts.conf 指定的字型安装路径。
  设定:
  先备份fonts.conf及local.conf,
  将fonts.conf这段模拟斜体描述移除:
  <!--
  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>
  
  如你有安装 firefly's patches,
  也请将local.conf这段模拟粗体描述移除:
  <!--
  Add by firefly@firefly.idv.tw
  Artificial bold for fonts without a bold version.
  -->
  <match target="font">
  <!-- check to see if the pattern requested > "medium" -->
  <test target="pattern" name="weight" compare="more">
  <const>medium</const>
  </test>
  <!-- pretend the font is bold now -->
  <edit name="weight" mode="assign">
  <const>bold</const>
  </edit>
  </match>
  
  然后将下面三段加到 local.conf 中:
  
  <match target="pattern">
  <test name="family">
  <string>Times New Roman</string>
  </test>
  <edit name="family" mode="append" binding="strong">
  <string>PMingLiU</string>
  </edit>
  </match>
  
  <match target="pattern">
  <test name="weight" compare="more">
  <const>medium</const>
  </test>
  <test name="family" compare="eq">
  <string>PMingLiU</string>
  </test>
  <edit name="family" mode="assign">
  <string>SimHei</string>
  </edit>
  </match>
  
  <match target="pattern">
  <test name="slant" compare="not_eq">
  <const>roman</const>
  </test>
  <test name="family" compare="eq">
  <string>PMingLiU</string>
  </test>
  <edit name="family" mode="assign">
  <string>DFKai-SB</string>
  </edit>
  <!-- pretend the font is oblique now -->
  <edit name="slant" mode="assign">
  <const>oblique</const>
  </edit>
  </match>
  
  笫一段是一般文字替代,Tmes New Roman没有的字型(如中文)会强制以 PMingLiU 来补入;当然,你可用Tahoma替代Tmes New Roman,SimSun 替代 PMingLiU(mingliu.ttc)。
  
  笫二段是将PMingLiU的粗体,转配给 SimHei(windows黑体);当然,你也可将SimSun 替代 PMingLiU。
  
  笫三段是将PMingLiU的斜体,转配给 DFKai-SB(windows楷体);当然,你也可将SimSun 替代 PMingLiU。
  
  下指令﹕#fc-cache -f
  
  在Mozilla设定字体,全选Times New Roman或Tahoma,在乎你安装的是甚么字体。




 相关文章  热门文章
在Sun Enterprise Server上配置SCSI磁带机 
安装Solaris 9的x86用户的切身体验
SUN SOLARIS 系统安全实施方案总结
用户认证功能的SQUID代理服务器
用 Apache 架站及虚拟主机完全篇
Linux 桌面激情之旅——JDS(二) 
Linux 桌面激情之旅——JDS(一)
感受完美 完全体验 SuSE Linux 9.0
IBM 存储全面加强中高端
IBM推出针对大型机的DB2新版本

 文章评论


认证培训
热门专题       more
相关下载
论坛新帖
博 客