Home
huangjiahua~~我自己的世界
关于 wine 在 zh_CN.UTF-8 , Ubuntu/Debian 下慢 

Advertisement

Customize
22nd-Jun-2006 11:58 pm
logo-1
wine 在 zh_CN.UTF-8 , Ubuntu/Debian 下启动个 notepad 都非常慢, 而 SUSE 下的却没问题。
看了下, 还是 请求 X core 字体的问题,在 zh_CN.UTF-8 下 wine 会请求 gbk-0 字体 ,
而通常 Ubuntu/Debian 都没 gbk-0 字体的, 即使有的话, 用 * 来匹配字体也是很慢的。

最彻底的是改 XLC_LOCALE , 让她不要请求这些多余字体

修改 /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
把里面有 GBK 字样的全部删掉。
这样 , wine 在 zh_CN.UTF-8 下的速度就跟 en_US 下一样快了, 而 XIM 输入法这些也没影响


看了下, 这个 XLC_LOCALE 在 苏哲 在他 还在 turbolinux 的时候建立的

$ head -n 3 /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
#     XFree86 NLS for Chinese locale zh_CN.UTF-8
#          Modified from xc/nls/XLC_LOCALE/en_US.UTF-8
#          by James Su <suzhe@turbolinux.com.cn>





附上修改以后的 /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
#     XFree86 NLS for Chinese locale zh_CN.UTF-8
#          Modified from xc/nls/XLC_LOCALE/en_US.UTF-8
#          by James Su <suzhe@turbolinux.com.cn>
#
# $XdotOrg: xc/nls/XLC_LOCALE/zh_CN.UTF-8,v 1.2 2004/04/23 18:44:34 eich Exp $
# $XFree86$

#
#  XLC_FONTSET category
#
XLC_FONTSET

on_demand_loading      True

object_name            generic

#  We leave the legacy encodings in for the moment, because we don't
#  have that many ISO10646 fonts yet.
#  fs0 class (7 bit ASCII)
fs0    {
       charset {
               name    ISO8859-1:GL
       }
       font    {
               primary         ISO8859-1:GL
               vertical_rotate all
       }
}

#  fs1 class (ISO8859 families)
fs1    {
       charset {
               name    ISO8859-1:GR
       }
       font    {
               primary ISO8859-1:GR
       }
}

#  fs2 class (Chinese Han Character)
fs2    {
       charset {
               name    GB2312.1980-0:GL
       }
       font    {
               primary GB2312.1980-0:GL
       }
}



#  fs4 class
fs4    {
       charset {
               name    ISO10646-1
       }
       font    {
               primary ISO10646-1
       }
}
END XLC_FONTSET

#
#  XLC_XLOCALE category
#
XLC_XLOCALE

encoding_name          UTF-8
mb_cur_max             6
state_depend_encoding  False

#  cs0 class
cs0    {
       side            GL:Default
       length          1
       ct_encoding     ISO8859-1:GL
}

#  cs1 class
cs1     {
        side            GR:Default
        length          1
        ct_encoding     ISO8859-1:GR
}

#  cs2 class
cs2     {
        side            GR
        length          2
        ct_encoding     GB2312.1980-0:GL; GB2312.1980-0:GR
}

#  cs3 class
cs3    {
       side            none
       ct_encoding     ISO10646-1
}

END XLC_XLOCALE




要修改,可以简单执行下这个命令
sudo sed -ie '/GBK/,/^}/d' /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
Comments 
23rd-Jun-2006 07:23 am (UTC) - 这些研究成果能合并到官方吗?
懒的自己去设了。
23rd-Jun-2006 08:18 am (UTC) - Re: 这些研究成果能合并到官方吗?
过几天,没问题就放入 Ubuntu
23rd-Jun-2006 08:51 am (UTC) - Re: 这些研究成果能合并到官方吗?
支持!
24th-Jun-2006 12:45 pm (UTC) - Re: 这些研究成果能合并到官方吗?
Anonymous
加字体就行,不要用后一种方法,你想害死人呐?
24th-Jun-2006 01:09 pm (UTC) - Re: 这些研究成果能合并到官方吗?
怎么会害人呢, 都不会有其他影响, XIM 也一样可以用
28th-Jun-2006 05:30 am (UTC) - Re: 这些研究成果能合并到官方吗?
XLC_LOCALE 要保留 GB2312

只去掉猪头 GBK 的就好
26th-Jun-2006 10:37 am (UTC) - 修改后的 /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
#     XFree86 NLS for Chinese locale zh_CN.UTF-8
#          Modified from xc/nls/XLC_LOCALE/en_US.UTF-8
#          by James Su <suzhe@turbolinux.com.cn>
#
# $XdotOrg: xc/nls/XLC_LOCALE/zh_CN.UTF-8,v 1.2 2004/04/23 18:44:34 eich Exp $
# $XFree86$

#
#  XLC_FONTSET category
#
XLC_FONTSET

on_demand_loading      True

object_name            generic

#  We leave the legacy encodings in for the moment, because we don't
#  have that many ISO10646 fonts yet.
#  fs0 class (7 bit ASCII)
fs0    {
       charset {
               name    ISO8859-1:GL
       }
       font    {
               primary         ISO8859-1:GL
               vertical_rotate all
       }
}

#  fs1 class (ISO8859 families)
fs1    {
       charset {
               name    ISO8859-1:GR
       }
       font    {
               primary ISO8859-1:GR
       }
}

#  fs2 class (Chinese Han Character)
fs2    {
       charset {
               name    GB2312.1980-0:GL
       }
       font    {
               primary GB2312.1980-0:GL
       }
}



#  fs4 class
fs4    {
       charset {
               name    ISO10646-1
       }
       font    {
               primary ISO10646-1
       }
}
END XLC_FONTSET

#
#  XLC_XLOCALE category
#
XLC_XLOCALE

encoding_name          UTF-8
mb_cur_max             6
state_depend_encoding  False

#  cs0 class
cs0    {
       side            GL:Default
       length          1
       ct_encoding     ISO8859-1:GL
}

#  cs1 class
cs1     {
        side            GR:Default
        length          1
        ct_encoding     ISO8859-1:GR
}

#  cs2 class
cs2     {
        side            GR
        length          2
        ct_encoding     GB2312.1980-0:GL; GB2312.1980-0:GR
}

#  cs3 class
cs3    {
       side            none
       ct_encoding     ISO10646-1
}

END XLC_XLOCALE
3rd-Nov-2006 01:27 pm (UTC) - Re: 修改后的 /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
另外一个比较容易想到的是添加 GBK 字体
( 不推荐 )

让 WQY 添加 GBK-0 字体
安装 wqy 后,加个文件/etc/X11/fonts/misc/xfonts-wqy.alias
写入
"-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-100-100-p-0-gbk-0" "-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-100-100-p-0-iso10646-1" "-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-75-75-p-0-gbk-0" "-wenquanyi-wenquanyi bitmap song-medium-r-normal--0-0-75-75-p-0-iso10646-1"

再执行
sudo update-fonts-alias misc
xset fp

这时候 wine 的反映速度就跟 zh_CN 下一样了 ( 启动个 notepad 或者 ms word 来看看 )


BTW: Edgy 里的 wqy 已经默认加了 GBK 的 alias
4th-Sep-2006 09:01 am (UTC) - 感谢~~~
Anonymous
开始还以为是我机器的问题呢,原来是这样的:)

第一个解决方案依赖于用户是否安装文泉驿,第二个方案比较直接。。。
9th-Oct-2006 05:22 am (UTC) - 请问如何安装word啊
Anonymous
请问如何安装word啊
9th-Oct-2006 05:32 am (UTC) - Re: 请问如何安装word啊
怕麻烦的话, 用 easywine 吧
9th-Oct-2006 08:46 am (UTC) - Re: 请问如何安装word啊
Anonymous
按照第一种方法,我的x-windows崩了,重启后进不去.
怎么样能恢复以前的设置啊?我用的是wqy字体.
9th-Oct-2006 08:47 am (UTC)
Anonymous
按照第一种方法,我的x-windows崩了,重启后进不去.
怎么样能恢复以前的设置啊?我用的是wqy字体.
5th-Dec-2007 11:50 pm (UTC) - pain
Anonymous
Tips for Treating Lower Back Pain! Ouch!

Advertisement

Customize
This page was loaded Jul 18th 2009, 10:41 pm GMT.