Hello I just reinstalled my 32.bit Ubuntu 10.10 Maverick and needed to reinstall the Chinese fonts in Wine. So I will take the first post and modify it to reflect the actual situation. The modified post is for Chinese font only.
Step 1: Getting the Locales
Execute the following:
Now open up the three files in a text editor and make certain each contains the following lines.Code:$ cd /var/lib/locales/supported.d/ # touch zh
If the lines are there and everything is saved, run:Code:zh_CN.UTF-8 UTF-8 zh_TW.UTF-8 UTF-8 zh_CN GB2312 zh_CN.GBK GBK zh_CN.GB18030 GB18030 zh_TW Big5
It will throw a warning about SJIS, but trust me, it's OK. Run the command again and everything will say "up-to-date" this time.Code:# dpkg-reconfigure locales
Next, prepare for a hellishly long download depending on which fonts you have installed (and if you live in, say, China, like me--our Ubuntu mirror sucks)
I took out the package ttf-saxanami-mincho since I got the error E: Unable to locate
Next up, even with all those installed, we will be missing a true Chinese font that handles multiple encodings. Don't suggest any of the AR fonts. It will FAIL on the menu bar of a Wine application. This step is necessary.Code:# apt-get install ttf-arphic-ukai ttf-arphic-uming ttf-kochi-gothic ttf-kochi-mincho ttf-mikachan ttf-mona ttf-sazanami-gothic ttf-vlgothic ttf-alee ttf-arphic-ukai ttf-arphic-uming ttf-baekmuk ttf-unfonts ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gkai00mp ttf-arphic-ukai ttf-arphic-uming
We will install Vera Sans YuanTi provided by the Chinese Ubuntu project. Sadly, there's no easy package for this one. We have to do: Well this is the tricky part. I have downloaded this package one year before, and don't have the exact link no more, so you will have to Google/Baidu for it yourself. The link here in the code is no longer accesible.
If you check the INSTALL file of WineLocale, you'll find information about installing Windows fonts. I will leave it out of this guide, because even without those we will get a fully functioning CJK Wine this way If you want the exact same fonts found in Window, follow that part of the guide.Code:$ wget http://download.ubuntu.org.cn/software/VeraSansYuanTi.tar.gz $ tar -zxpvf VeraSansYuanTi.tar.gz # mv VeraSansYuanTi /usr/share/fonts/ # fc-cache -f # cp /etc/fonts/fonts.conf /etc/fonts/fonts.conf.old # cp /usr/share/fonts/VeraSansYuanTi/fonts.conf /etc/fonts/
Step 2: Stealing a nice Wine setup
Run the new "ie6" command once and close it. Now do:Code:# apt-get update # apt-get install cabextract wine $ wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz $ tar zxpvf ies4linux-latest.tar.gz $ cd ies4linux-* $ ./ies4linux
$ cp -r ~/.ies4linux/downloads/ie6/* ~/.wine/
[/code]Step 3: Install WineLocale
Download WineLocale from my website <http://www.cinnamonpirate.com/software/winelocale/> or grab it with wget:
This will install the WineLocale default files in /usr/local/share/wineloc and create a symlink in /usr/local/bin. You can now run "wineloc" from anywhere on your system.Code:$ wget http://www.cinnamonpirate.com/pub/software/sh/wineloc-0.41.tar.gz $ tar zxpvf wineloc-0.41.tar.gz $ cd wineloc-0.41 $ ./install
Step 4: Using WineLocale
WineLocale, at base, is extremely easy to use. The simplest command line is:
-l is the locale flag. If omitted, WineLocale will run it in your current system locale. Valid options are:[*]ja_JP - Japanese[*]ko_KR - Korean[*]zh_CN - Chinese (Simplified)[*]zh_TW - Chinese (Traditional)Code:$ wineloc -l zh_CN /path/to/executable.exe
zh_HK and zh_SG will just alias to the other two Chinese modes if you use them. There is also a -o flag that will let you enable DLL overrides (use real DLLs instead of Wine's). This option is tied to a IEs4Linux created Wine setup. If you didn't use theirs, don't touch it or evil magic may happen. Hey, don't complain about "choice": you have the choice not to follow this guide
There's also one more option, -f, which lets you specify a different font group. "common" is the default, but there is also a "win" packed in if you followed the guide to install Windows fonts.
You can create your own font themes and overrides if you explore ~/.wineloc/patches, but that's a topic for another guide.
If you followed everything so far, congratulation, you can now run CJK applications in Wine. On launch, the registry will be hacked up to fit your locale. On exit, everything reverts back to the default so your normal Wine applications won't exhibit any odd behavior. If you manage to "crash" it so settings get stuck, you can run this command to reset all font preferences. Ignore any "errors":
If you check my website, you can see pictures of CJK applications running using WineLocale. To get your Wine applications looking close to the rest of your UI, you need to use "winecfg". Check section iii of INSTALL, "Configuring Wine with winecfg," to see how to do this.Code:$ regedit /usr/local/share/wineloc/patches/default.reg