1. xmms使用的是GTK 1.x的字体机制,与现在通用的fontconfig有所区别,故而要按GTK 1.x的字体机制安装一可用之中文字体。
2. 本文采用文泉驿( http://wqy.sourceforge.net/cgi-bin/...tar.gz?download
3. 获得包为wqy-bitmapfont-pcf-0.6.0.tar.gz;
a. 解压: tar zxf wqy-bitmapfont-pcf-0.6.0.tar.gz,其会在当前路径下产生目录 wqy-bitmapfont/
b. 建立安装字体的目录:mkdir /usr/share/fonts/wenquanyi
c. 拷贝字体文件:copy wqy-bitmapfont/*.pcf /usr/share/fonts/wenquanyi/
d. 修改/etc/fonts/conf.d/no-bitmaps.conf, false 改为 true
e. 让x-windows找到字体:
cd /usr/share/fonts/wenquanyi
mkfontdir
cp fonts.dir fonts.scale
xset +fp /usr/share/fonts/wenquanyi/
f. 在/etc/X11/XF86Config-4或者/etc/X11/xorg.conf (取决于你所采用的xserver)中添加
FontPath "/usr/share/fonts/wenquanyi/"
g. 查看系统是否能找到所安装的字体
xset q
xlsfonts | grep wenquanyi
若成功应有如下信息
-wenquanyi-wenquanyi bitmap song-bold-r-normal--0-0-75-75-p-0-iso10646-1
-wenquanyi-wenquanyi bitmap song-bold-r-normal--12-120-75-75-p-80-iso10646-1
-wenquanyi-wenquanyi bitmap song-bold-r-normal--13-130-75-75-p-80-iso10646-1
-wenquanyi-wenquanyi bitmap song-bold-r-normal--15-150-75-75-p-80-iso10646-1
-wenquanyi-wenquanyi bitmap song-bold-r-normal--16-160-75-75-p-80-iso10646-1
-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-75-75-p-0-iso10646-1
-wenquanyi-wenquanyi bitmap song-medium-r-normal--12-120-75-75-p-80-iso10646-1
-wenquanyi-wenquanyi bitmap song-medium-r-normal--13-130-75-75-p-80-iso10646-1
-wenquanyi-wenquanyi bitmap song-medium-r-normal--15-150-75-75-p-80-iso10646-1
-wenquanyi-wenquanyi bitmap song-medium-r-normal--16-160-75-75-p-80-iso10646-1
4. ln -s /etc/gtk/gtkrc.zh_CN /etc/gtk/gtkrc.zh_CN.utf-8
5. 修改/etc/gtk/gtkrc.zh_CN 为:
style "gtk-default-zh-cn-utf8" {
fontset = "-wenquanyi-wenquanyi bitmap song-medium-r-normal--12-120-75-75-p-80-iso10646-1"
}
class "GtkWidget" style "gtk-default-zh-cn-utf8"
本文locale为zh_CN.UTF-8
6. 修改 ~/.xmms/config
playlist_font=-wenquanyi-wenquanyi bitmap song-medium-r-normal--12-120-75-75-p-80-iso10646-1
use_fontsets=TRUE
mainwin_use_xfont=TRUE
mainwin_font=-wenquanyi-wenquanyi bitmap song-medium-r-normal--12-120-75-75-p-80-iso10646-1
注:在gtkrc.zh_CN.utf-8为:
style "gtk-default-zh-cn-utf8" {
fontset = "-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,/
-wenquanyi-wenquanyi bitmap song-medium-r-normal--12-120-75-75-p-80-iso10646-1"
}
class "GtkWidget" style "gtk-default-zh-cn-utf8"
时,会发生播放列表显示正常,但菜单中之中文显示为方块的现象,删去-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1即可,wenquanyi的字体对英文的显示解决的很好