|
附:众所周知我们汉化linux的X时一般采用simsun字体.不可否定,论小号汉字的效果,simsun是算最好的TrueType字体了.但它的英文字符显示效果却不敢恭维了!很想改变其英文字符的显示方式,但一直均末成功.通过我多次反复实践,我终于找到了改变这一状况的方法.(如上图)
过程 仅汉化KDE桌面,其它汉化不涉及)
1.把windows XP下simsun.ttc与msgothic.ttc分别改名为simsun.ttf与msqothic.ttf并拷进/usr/share/fonts/TrueType/simsun(先建立此目录)下(这两个文件分别是汉字与英文字体文件,可在Windows的c:\windows\fonts下找到,至于其它像windows 98有没有msgothic.ttc文件,因为我现在没用98,因此我也不知道98有没有这个字体文件.).并建立文本文件fonts.dir,其内容如下:
30
simsun.ttf -simsun-simsun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.2:simsun.ttf -simsun-simsun-medium-o-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.4:simsun.ttf -simsun-simsun-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0
ab=y:simsun.ttf -simsun-simsun-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.2:ab=y:simsun.ttf -simsun-simsun-bold-o-normal--0-0-0-0-c-0-gb2312.1980-0
ai=0.4:ab=y:simsun.ttf -simsun-simsun-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0
sw=1:bw=0.5:msgothic.ttf -simsun-simsun-medium-r-normal--0-0-0-0-c-0-iso8859-1
ab=y:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-bold-r-normal--0-0-0-0-c-0-iso8859-1
ai=0.2:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-medium-o-normal--0-0-0-0-c-0-iso8859-1
ai=0.4:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-medium-i-normal--0-0-0-0-c-0-iso8859-1
ai=0.2:ab=y:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-bold-o-normal--0-0-0-0-c-0-iso8859-1
ai=0.4:ab=y:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-bold-i-normal--0-0-0-0-c-0-iso8859-1
ai=-0.2:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-medium-ro-normal--0-0-0-0-c-0-iso8859-1
ai=-0.4:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-medium-ri-normal--0-0-0-0-c-0-iso8859-1
ai=-0.2:ab=y:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-bold-ro-normal--0-0-0-0-c-0-iso8859-1
ai=-0.4:ab=y:sw=1:bw=0.5:msgothic.ttf -simsun-simsun-bold-ri-normal--0-0-0-0-c-0-iso8859-1
ai=-0.4:simsun.ttf -simsun-simsun-medium-ri-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.4:ab=y:simsun.ttf -simsun-simsun-bold-ri-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.2:simsun.ttf -simsun-simsun-medium-ro-normal--0-0-0-0-c-0-gb2312.1980-0
ai=-0.2:ab=y:simsun.ttf -simsun-simsun-bold-ro-normal--0-0-0-0-c-0-gb2312.1980-0
simsun.ttf -simsun-simsun-medium-r-normal--0-0-0-0-c-0-gbk-0
ai=0.2:simsun.ttf -simsun-simsun-medium-o-normal--0-0-0-0-c-0-gbk-0
ai=0.4:simsun.ttf -simsun-simsun-medium-i-normal--0-0-0-0-c-0-gbk-0
ab=y:simsun.ttf -simsun-simsun-bold-r-normal--0-0-0-0-c-0-gbk-0
ai=0.2:ab=y:simsun.ttf -simsun-simsun-bold-o-normal--0-0-0-0-c-0-gbk-0
ai=0.4:ab=y:simsun.ttf -simsun-simsun-bold-i-normal--0-0-0-0-c-0-gbk-0
ai=-0.4:simsun.ttf -simsun-simsun-medium-ri-normal--0-0-0-0-c-0-gbk-0
ai=-0.4:ab=y:simsun.ttf -simsun-simsun-bold-ri-normal--0-0-0-0-c-0-gbk-0
ai=-0.2:simsun.ttf -simsun-simsun-medium-ro-normal--0-0-0-0-c-0-gbk-0
ai=-0.2:ab=y:simsun.ttf -simsun-simsun-bold-ro-normal--0-0-0-0-c-0-gbk-0
然后在同一目录下把fonts.dir 复制为fonts.scale文件.
2.编辑/etc/X11/XF86Config-4文件,加上
所需要的字体路径,如下所示:(#表示注释行,以下同)
Section "Files"
FontPath "/usr/X11R6/lib/X11/fonts/TrueType/simsun" (关键)
FontPath "unix/:-1"(有些系统如RedHat的可能是7100,要和原来的一致)
EndSection
还有在该文件的Modules部分,请加上xtt模块,同时必须取消freetype模块,两模块不可同时使用。
例如:
Section "Module"
Load "dbe" # Double-buffering
# Load "GLcore" # OpenGL support
# Load "dri" # Direct rendering infrastructure
Load "glx" # OpenGL X protocol interface
Load "extmod" # Misc. required extensions
Load "v4l" # Video4Linux
# Load "pex5" # PHIGS for X 3D environment (obsolete)
# Load "record" # X event recorder
# Load "xie" # X Image Extension (obsolete)
# You only need the following two modules if you do not use xfs.
# Load "freetype" # TrueType font handler
Load "xtt" # TrueType font handler (关键)
# Load "type1" # Adobe Type 1 font handler
EndSection
3.进入KDE.运行"控制中心"把所有的字体改为"simsun".然后重新启动X(只需按ctrl+alt+backspace键就可以了.)后进入kde就成功了!
:cool: |
|