Maybe the following is common knowledge in the areas where that problem would be more serious. Sorry, I can’t read or understand any of the Asian languages, so I wasn’t able to find much on the subject.
I was trying to look at a localization problem in Creator on my SuSE Linux box. So I have an account on my box which runs in a Japanese locale. I tried to start Creator there and hey, why do I only see little empty squares instead of glyphs? I have a couple of Japanese fonts installed and KDE is mostly happy with the selection;-)
It turns out the jvm has it’s own font configuration setup. When you know what to look for, java.sun.com has a nice description. So I looked at the source files and quickly realized that SuSE Linux is not really supported with Asian fonts:-(
The description above has a little note that changing/adding those fontconfig files is a modification of the JRE and that Sun does not support modified JRE’s. So keep that in mind when you read and/or follow the reminder of this. I live always outside of the officially supported setups, so for me that note was not a problem;-)
So I compared the fontconfig files for RedHat and SuSE and so I found what I needed to look for;-) I got and installed the following packages (Those packages might have similar names in other distros!)
- For Japanese: kochi-substitute
- For Chinese: ifntchia, ifntchib, ttf-arphic, ttf-arphic-bkai00mp, ttf-arphic-bsmi00lp, ttf-arphic-gbsn00lp, ttf-arphic-gkai00mp
- For Korean: baekmuk-ttf
Now came the fun part:-( The fonts had different font names from the ones in the RedHat fontconfig. So I looked at all the fonts and created a new fontconfig for my system. That works at least for my Japanese setup. Here is a link to my fontconfig.SuSE.properties. This file would go into JRE_HOME/lib/.
I’m happy now and can look at my initial problem;-)
Have fun and don’t forget to reproduce your problems with the little squares before reporting;-)
— Marco
Hi Marco,
I am running into a localization boondoggle, and hope you can help!
The localized JPN version of the app I am working on is “coming up boxes” on SuSE 10, but works fine on Win XP…
I tried adding in the font properties file you created, but fear I may have missed a step. Here’s an overview:
SUSE 10 w/ gnome desktop
• Install latest JRE (jre-1_2_0_6-linux-i586.rpm) with YaST2
• Make symbolic link form the java/lib/plugins to mozilla firefox’s plugins folder
• Add the fontconfig.SuSE.properties to usr/local/JRE_-1_2_0_6 (adding “.src” to the file name so it overwties the file already there).
• Install the koichi subs. Font rpm.
• Change locale to JPN.
Still get the boxes…
Could this be because the properties files with the strings were converted to the Unicode escape characters (using native2asci) with the SJIS encoding? If so, I wonder if I will need separate properties files for Linux and Windows. And also, what encoding SuSE want to see for JPN?
The properties file controlling the look of the fonts reads like this:
Text.FontName = Dialog
Text.FontPlain = 0
Text.FontSize = 12
Text.I18N.Linux.FontSize = 16 (etc.)
Let me know if I need to provide more info. Any help appreciated!
PS: This is my fist venture into Linux-land, so if I am missing something really obvious, go easy on me 😉
Thanks,
Cory