Monday, February 23, 2009

Gentoo安装之二:安装中文字体

英文环境的gentoo自带的中文字体很陋,所以必须重新安装字体。

emerge arphicfonts wqy-bitmapfont corefonts ttf-bitstream-vera

下载后的字体,位于/usr/share/fonts 中,为了便于管理,可将其移到/usr/local/share/fonts下,一般下下来的字体文件夹内都自带了font.scale和font.dir,无须再用mkfontscale和mkfontdir生成索引,系统能自动识别。当然,前提是,你把字体文件夹的路径加入的/etc/xorg.conf的Files section的FontPath
Section "Files"
RgbPath "/usr/share/X11/rgb"
............#以下开始是中文字体,fontconfig默认会选择第一个
FontPath "/usr/local/share/fonts/ttf-bitstream-vera/"
FontPath "/usr/local/share/fonts/arphicfonts/"
FontPath "/usr/local/share/fonts/wqy-bitmapfont/"
FontPath "/usr/local/share/fonts/corefonts/"
EndSection

另外,再本地化时,/etc/locale.gen应加入:
en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB18030
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
zh_CN.UTF-8 UTF-8
再用locale-gen生成以下locale,以便glibc使用。

No comments:

Post a Comment

Insist On

English words
Go to bed at 23:30

About Me

Gtalk:l0he1g at gmail
Location:Beijing,China