Creator (Java SE) and Asian Fonts

By | December 9, 2005

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, 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!)

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 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

One thought on “Creator (Java SE) and Asian Fonts

  1. Cory Whitney

    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 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 😉

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.