This discussion is archived
0 Replies Latest reply: Feb 10, 2010 6:12 AM by 502559 RSS

Problem displaying korean on Linux Redhat 8

502559 Newbie
Currently Being Moderated
Hi, my Swing app was happily displaying Korean and every other language I threw at it at some point in the past. But later versions do not display languages such as korean anymore - latin is fine , I cannot see any change in the font handling of the application but it does now demand Java 1.6_0_04 or later, previously it just required 1.6.

I ran:
import java.awt.*;
public class FontTest
{
    public static void main(final String[] args) throws Exception
    {
        Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
        for(Font font:fonts)
        {
            if(font.canDisplay('片'))
            {
                System.out.println(font.getFontName());
            }
        }
    }
}
against both Java 1.6_0_03 and 1.6_0_18, the older JRE returned about 20 fonts that could handle the character including the standard serif ones but the latest JRE only returned three, why the big difference ?

I then decided to use one of these three fonts called 'baekmuk gulim' , as follows

text.setFont(Font.decode("baekmuk gulim));

but it still didn't solve the problem, character was just displayed as a square.

Anybody got any ideas, the application works fine on OSX using the default fornts, and on WIndows using the "arial unicode" font


Paul