+ -
当前位置:首页 → 问答吧 → 字体替换[几种字体同一页面显示]

字体替换[几种字体同一页面显示]

时间:2004-08-26

来源:互联网

将字体放到 fonts.conf 指定的字型安装路径。
先备份fonts.conf及local.conf,

将fonts.conf这段模拟斜体描述移除:
[php]
<!--
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>[/php]

如你有安装 firefly's patches,
也请将local.conf这段模拟粗体描述移除:[php]
<!--
Add by [email protected]
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>[/php]

然后将下面三段加到 local.conf 中:
[php]
<match target="pattern">
<test name="family">
<string>Times New Roman</string>
</test>
<edit name="family" mode="append" binding="strong">
<string>MingLiU</string>
</edit>
</match>


<match target="pattern">
<test name="weight" compare="more">
<const>medium</const>
</test>
<test name="family" compare="eq">
<string>MingLiU</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>MingLiU</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>[/php]


笫一段是一般文字替代,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,在乎你安装的是甚么字体。

补充一点,假如你发觉Tahoma的粗体不见了,不用粗心,
只要将windows下的 tahomabd.ttf 也安装进去吧!


在所贴的Mozilla撷图中,包括了几款字体:
Times New Roman, mingliu.ttc, simhei.ttf ,kaiu.ttf
一般都可在Windows 中找到;
当然亦可用:
Tahoma, simsun.ttc, simhei ,kaiu.ttf.

http://www.chinalinuxpub.com/read.htm?id=1410      

作者: tseteen   发布时间: 2004-08-26

热门下载

更多