热门关键字:  ubuntu  分区  函数  Fedora  linux系统进程

[Ubuntu]明明白白安装中文字体

来源: 作者: 时间:2007-11-14 Tag: 点击:

将本文件中的别名mono替换成全称monospace,这是xml的一个自动替换声明,使用别名的目的应该是为了简化书写或者维持对旧版本的兼容。后面还有几个替换就不再一一介绍了。

<!–
Serif faces
–> <alias>
<family>Bitstream Vera Serif</family>
<family>Vera Sans YuanTi</family> <!– added by lifesinger–>
<family>Times</family>
<family>Times New Roman</family>

Serif字型将要使用的字体顺序。当要显示Serif字型的内容时,就从下面这个列表中选择字体,匹配顺序是自上而下。可以看到已经安装的圆体美化再这里作了修改。如果我们想把宋体作为首选,就在Bitstream Vera Serif字体前面比葫芦画瓢加上一行就可以了。

至于什么是Serif字型,以及Sans-serif字型,可以看一下细说字体 Sans Serif 与 Serifserif vs sans serif这两篇文章,说明的很详细。我觉得把他们叫做字型或者字族,相对于字体来说,更贴切一些。

下面的Sans-serif faces、Monospace faces段中处理方式相同。

<!–
If the font still has no generic name, add sans-serif
–>
<match target=”pattern”>

又是三个替换,大概意思是如果上面的字体匹配还不成功,就尝试使用sans-serif、serif、monospace的默认字体来替换,最后如果还替换不成功,强制使用sans-serif字体。(不知道这么理解是否正确)

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

一些亚洲字体实际使用了等宽字体,但是却没有明确的声明,这段就是为了兼容这个进行的处理,保持不变即可。

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

修正Bitstream Vera字体在小于8点的时候的显示问题,保持不变即可。

<!–
Load local system customization file

<include ignore_missing=”yes”>local.conf</include>
–>

加载配置文件local.conf,下面的~/.fonts.conf也是一样。

<!–
Provide required aliases for standard names
–>
<alias>
<family>serif</family>
<prefer>
<family>Bitstream Vera Serif</family>

又是三个系列字型的字体别名,不知道这个和前面的类似设置是怎么个关系,大概前面设置的是备选字体,这里是推荐字体?不过照例把我们的SimSun加进去。

<!–
Artificial oblique for fonts without an italic or oblique version
–>

对没有斜体字的字体的处理方法,保持不变即可。

<!–
Synthetic emboldening for fonts that do not have bold face available
–>

没有黑体字的字体的处理方法,保持不变即可。

<!–
These are the default Unicode chars that are expected to be blank
in fonts. All other blank chars are assumed to be broken and
won’t appear in the resulting charsets
–>

Unicode编码中在所有字体中都应该显示为空的编码表,保持不变即可。

<!– Rescan configuration every 30 seconds when FcFontSetList is called
–>

每隔30秒钟就重新检查一下本设置文件(看设置改变了没有),保持不变即可。

至此,标准的配置文件就结束了,我们需要作的主要修改也都完成了。重启X应该就能看到宋体中文的界面了。不过在fonts.conf还可以作一些其他的字体处理设置,这个在圆体美化所带的那个fonts.conf中有例子,比如:


<!– Win XP 效果 –>
<match target=”font”>
<test name=”family”><string>Vera Sans YuanTi</string></test>
<edit name=”globaladvance”><bool>false</bool></edit>
</match>

这就是指明在对Vera Sans YuanTi字体的处理中,globaladvance参数设置为false,其他的设置也多是这种语法,具体的含义和效果我就不知道了:)。

最新评论共有 4 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
栏目列表
热点关注
相关文章