- 论坛徽章:
- 0
|
[color="#ff0033"]注:请将本文中的所有 》转变为 >, 所有《 转变为 默认配置下,中文的显示看起来比较淡,也比较模糊。普遍的解决方法是使用windows的simsun字体,但是宋体中的英文和数字字体很不美观,结果是英文字体又不好看了。经过摸索,找到了一个两全其美的方案。美化步骤如下:1、从windows的fonts文件夹里,复制simsun.ttc,times.ttf, tahoma.ttf到/usr/share/fonts/chinese/TrueType/ 里。并将simsun.ttc 更名为simsun.ttf。其中,simsun.ttf 是中文宋体,也是windows里中文采用的字体。times.ttf,tahoma.ttf是英文字体,显示英文比较好看。2、在命令行运行命令: fc-cache /usr/share/fonts/chinese/TrueType3、打开 /etc/fonts/fonts.conf 。在 《!-- 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》SimSun《/string》《/test》 《edit name="antialias" mode="assign"》《bool》false《/bool》《/edit》 《/match》 这样来避免字体被过分平滑。4、在 /etc/fonts/fonts.conf 中,所有类似如下的地方,全部simsun字体 《family》Bitstream Vera Serif《/family》 《family》Times《/family》 《family》Times New Roman《/family》 《family》Nimbus Roman No9 L《/family》 《family》Luxi Serif《/family》 《family》Sazanami Mincho《/family》 《family》Kochi Mincho《/family》 《family》SimSun《/family》 《!--增加这样的一行 wh add --》 《family》AR PL SungtiL GB《/family》 《family》AR PL Mingti2L Big5《/family》 《family》BaekmukBatang《/family》 《default》《family》serif《/family》《/default》 要点就是,simsun要插入到所有英文字体的最后面、非英文字体的最前面!5、在 /usr/share/fonts/chinese/TrueType/fonts.dir 和 fonts.scale 前面,插入times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-iso10646-1times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-so8859-1times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-iso8859-10times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-iso8859-15times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-iso8859-2times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-iso8859-3times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-iso8859-4times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-iso8859-5times.ttf -arphic technology co.-ar pl Times New Roman-medium-r-normal--0-0-0-0-p-0-iso8859-9tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-iso10646-1tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-so8859-1tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-10tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-15tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-2tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-3tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-4tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-5tahoma.ttf -arphic technology co.-ar pl Tahoma-medium-r-normal--0-0-0-0-p-0-iso8859-9simsun.ttf -arphic technology co.-ar pl simsun gb-medium-r-normal--0-0-0-0-c-0-ascii-0simsun.ttf -arphic technology co.-ar pl simsun gb-medium-r-normal--0-0-0-0-c-0-iso10646-1simsun.ttf -arphic technology co.-ar pl simsun gb-medium-r-normal--0-0-0-0-c-0-gb18030-0simsun.ttf -arphic technology co.-ar pl simsun gb-medium-r-normal--0-0-0-0-c-0-gb2312-0simsun.ttf -arphic technology co.-ar pl simsun gb-medium-r-normal--0-0-0-0-c-0-gbk-0注意要修正第一行的数字,使其等于下面内容的行数。完成上述步骤后,在Preferences(首选项)里的font(字体)里,不管是中文语言环境还是英文语言环境,都将字体设为英文,具体的那个字体,就看喜好了。在firefox──包括别的所有不采用系统字体设置的软件里也如此设置。这样,中文和英文就都显示的很完美了,和windows里的一样。如果还有问题,不妨再增加一个步骤:把 /usr/share/fonts/japanese/TrueType 里的 *.ttf 都用simsun.ttf覆盖──即文件名还是原来的文件名,但是文件内容是simsun.ttf的内容。[color="#ff0033"]
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/64534/showart_509487.html |
|