Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xmms 菜单与播放列表的乱码问题
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
xmwxd
n00b
n00b


Joined: 17 Sep 2004
Posts: 64

PostPosted: Wed Dec 15, 2004 4:37 pm    Post subject: xmms 菜单与播放列表的乱码问题 Reply with quote

xmms右键乱码和播放清单乱码等问题到底是什么原因
虽然解决了问题
但是不知道原因阿
有没有兄弟讲讲阿


Last edited by xmwxd on Thu Dec 16, 2004 10:18 am; edited 1 time in total
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Thu Dec 16, 2004 4:29 am    Post subject: Reply with quote

因历史原因, Linux 系统里有两套字体系统, 一个是老的核心 X 字体子系统 (Core X Font Subsystem) , 另一个是新的 Fontconfig 字体子系统 (Fontconfig Font Subsystem).

xmms 使用的是 gtk1 的图形控件库, 因此它的字体受 gtk1 对字体支持的影响. 而 gtk1 使用的是核心 X 那个老的字体子系统, 它的字体配置必须通过如:

Code:

-misc-simsun-medium-r-normal-*-*-120-*-*-c-*-koi8-r


这样非常丑陋的方式来指定. 而到了 Fontconfig 中, 只需使用 simsun 这样 "人类友好" 的方式来指定字体.

所有 gtk1 程序的字体都是在 /etc/gtk/gtkrc.* 文件中指定, 例如要让你的 xmms 使用简体中文界面且字体为 simsun, 你就需要编辑 /etc/gtk/gtkrc.zh_CN 中的 fontset 值, 让它等于上面那个很丑的字体描述 (-misc....). 然后你所有的 gtk1 程序里的中文都会使用 simsun. (包括 xmms 的右键菜单)

至于 xmms 播放列表里的字体, 这个是 xmms 自己本身的设置, 也就是说, 它不听从 gtkrc.zh_CN 里的设置. 这个设置是保存到 ~/.xmms/ 目录里的. 因此你还得为播放列表本身的中文指定字体. (同样, 指定字体的时候你会发现里面的字体名一样是 -misc-... 这样的方式)

不知道我说清楚了没有, 希望对你明白这个问题有帮助!

另外, 建议你把题目改成 "xmms 菜单与播放列表的乱码问题", 以让主题鲜明 . 谢谢!

请仔细看过发贴指引.
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
songhero
n00b
n00b


Joined: 13 Dec 2004
Posts: 5
Location: ShenZhen,GuangDong P.R.China

PostPosted: Thu Dec 16, 2004 6:17 am    Post subject: Reply with quote

不应该直接修改/etc/gtk/gtkrc.*
正确的方法应该是cp /etc/gtk/gtkrc.zh_CN ~/.gtkrc.mine
然后对~/.gtkrc.mine进行编辑

可以参考这里http://www.linuxsir.org/bbs/showthread.php?s=&threadid=146550
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Thu Dec 16, 2004 6:24 am    Post subject: Reply with quote

songhero wrote:
不应该直接修改/etc/gtk/gtkrc.*
正确的方法应该是cp /etc/gtk/gtkrc.zh_CN ~/.gtkrc.mine
然后对~/.gtkrc.mine进行编辑


呵呵, 选择的问题, 改 /etc/gtk/gtkrc.* 的话是系统全局有效的, 每个帐号都因此统一字体 (或说不必每个帐号都去设置一次自己的 ~/.gtkrc.mine - 是这个文件么? 还是 ~/.gtkrc 就可以? 我自己没试过). 当然, 如果用户本身没有 root 权限, 则可以通过改自己目录下的 ~/.gtkrc.mine (?) 来为自己设置.

如果有 root 权限, 考虑到 /etc/gtk/gtkrc.* 这些也不是什么重要的系统文件, 直接修改也没有安全方面的问题, 如果担心自己改错, 则不妨先 copy 一个备份, 或者像我注释掉原来那行然后依样画瓢:

Code:

style "gtk-default-zh-cn" {
#       fontset = "-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-1,\
#                 -*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*"
        fontset = "-bitstream-bitstream vera sans-medium-r-normal-*-*-120-*-*-p-*-microsoft-cp1252,-misc-simsun-medium-r-normal-*-*-120-*-*-c-*-koi8-r"
}
class "GtkWidget" style "gtk-default-zh-cn"


大家自己选择自己喜欢的方式吧 :)
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
qing
Tux's lil' helper
Tux's lil' helper


Joined: 04 Nov 2002
Posts: 95

PostPosted: Tue Jan 04, 2005 1:04 pm    Post subject: Reply with quote

看有些什么中文字体先。。。然后来添加。。。


Code:
 xlsfonts | grep simsun
Back to top
View user's profile Send private message
xevix
Apprentice
Apprentice


Joined: 02 Oct 2004
Posts: 284
Location: Cali, USA

PostPosted: Wed Feb 16, 2005 12:45 am    Post subject: Reply with quote

hi, can somebody make a summary of the solution to this in english? including how to install the fonts needed maybe? thanks in advance.
_________________
AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ AuthenticAMD GNU/Linux 2x2.2 ghz
nVidia GeForce 8800 GTS 320Mb
250 gb SATA hd
2gb pc-3200 DDR
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum