Ross Wan's World!

Python, Ajax, PHP and Linux.

解决 Wine 的中文乱码问题

Posted by Ross Wan 于 2008/05/15

        参考了 ubuntu 中文网的一篇 wiki,对其作了一些更正和修改。新建一个 mywine.reg 文件,下面是其内容:

REGEDIT4
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current\Software\Fonts]
“FIXEDFON.FON”=””
“FONTS.FON”=””
“LogPixels”=dword:00000070
“OEMFONT.FON”=””
[HKEY_CURRENT_USER\Software\\Wine\\Fonts\\Replacements]
@=”SimSun”
“Arial”=”SimSun”
“Fixedsys”=”SimSun”
“Microsoft Sans Serif”=”SimSun”
“MingLiU”=”SimSun”
“MS UI Gothic”=”SimSun”
“PMingLiU”=”SimSun”
“Simsun”=”SimSun”
“Songti”=”SimSun”
“System”=”SimSun”
“Tahoma”=”SimSun”
“Terminal”=”SimSun”
“宋体”=”SimSun”
[HKEY_CURRENT_USER\Software\\Wine\\X11 Driver]
“ClientSideAntiAliasWithRender”=”Y”
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
“MS Shell Dlg”=”SimSun”
“MS Shell Dlg 2″=”SimSun”
“System”=”SimSun”
[HKEY_CURRENT_USER\Control Panel\\Colors]
“ActiveBorder”=”239 235 230”
“ActiveTitle”=”0 153 11”
“AppWorkspace”=”128 128 128”
“Background”=”58 110 165”
“ButtonAlternateFace”=”180 180 180”
“ButtonDkShadow”=”64 64 64”
“ButtonFace”=”232 227 221”
“ButtonHilight”=”255 255 255”
“ButtonLight”=”239 235 230”
“ButtonShadow”=”128 128 128”
“ButtonText”=”0 0 0”
“GradientActiveTitle”=”166 202 240”
“GradientInactiveTitle”=”192 192 192”
“GrayText”=”128 128 128”
“Hilight”=”0 153 11”
“HilightText”=”255 255 255”
“HotTrackingColor”=”0 0 255”
“InactiveBorder”=”192 192 192”
“InactiveTitle”=”232 227 221”
“InactiveTitleText”=”0 0 0”
“InfoText”=”0 0 0”
“InfoWindow”=”255 255 225”
“Menu”=”232 227 221”
“MenuBar”=”232 227 221”
“MenuHilight”=”0 0 0”
“MenuText”=”0 0 0”
“Scrollbar”=”239 235 230”
“TitleText”=”255 255 255”
“Window”=”255 255 255”
“WindowFrame”=”0 0 0”
“WindowText”=”0 0 0”

       注意,wiki 原文的注册文件内容由于在每一行前面多了一个空格,导致不能导入!我这里已经作了修改。下面可以使用 regedit 命令导入这个注册表文件:

$ regedit mywine.reg

       复制相应的字体文件或者创建字体文件的链接到 ~/.wine/drive_c/windows/Fonts 目录。例如:

$ ln -s ~/.fonts/YuanTi.ttf ~/.wine/drive_c/window/Fonts/simsun.ttc

       上面注册文件中的 “ClientSideAntiAliasWithRender”=”Y” 是用于开启反锯齿效果,如果你在使用矢量字体,必须开启。如果使用点阵字体的话,可以将其关闭: “ClientSideAntiAliasWithRender”=”N”。

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

 
%d 博主赞过: