3 Replies Latest reply: Nov 19, 2010 7:02 AM by DarrylBurke RSS

    getAvailableFontFamilyNames doesn't display Korean tcc font

    843810
      I developed an application in Swing that displays text. On PC's with Windows XP language set to English I can see Korean characters displayed well. On the same PCs with language set to Korean, those characters are not displayed.

      Debugging this code:
      GraphicsEnvironment ge = GraphicsEnvironment
                          .getLocalGraphicsEnvironment();
                String fontNames[] = ge.getAvailableFontFamilyNames();
      I see that font gulim.tcc is not returned by getAvailableFontFamilyNames() if I set the Windows language to Korean. It is the only tcc font type that I have, however the rest of fonts which are all ttf are returned by that method.

      Can anybody help about this?

      Thanks in advance

      Iñaky
        • 1. Re: getAvailableFontFamilyNames doesn't display Korean tcc font
          843810
          I keep on testing. The following code
          public class Fonts {
               public static void main(String[] args){
                   try{
                         String[] f = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
                         for (int i = 0; i < f.length; ++i) {
                              System.out.println(f);
                         }     
                    } catch (Exception e){
                         System.out.println("e:"+e);
                    }
               }
          }
          - With Java 1.5_17 - Windows XP in English: it takes Gulim font
          - With Java 1.5_17 - WIndows XP in Korean: it doesn't take Gulim font
          - With Java 1.6_17 - Windows XP in Korean: IT TAKES Gulim FONT.
          
          So it seems an issue with the JVM.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
          • 2. SunGraphics2D doesn't display korean characters in JDK 1.5.0_17
            816554
            Hi all

            The problem I have is not with the fonts. Here
            private void fill(Graphics2D g) {
                 g.fill(shape);
            }
            where g is SunGraphics2D.

            If the text to render is:
            한국어/조선말<
            this only paints
            / <
            However, if I build my application with JDK1.6_17 without changing anything all characters are painted.

            Could somebody suggest me a workaroung or something to make this work in JDK 1.5.0_17 ?

            Thanks in advance
            • 3. Re: SunGraphics2D doesn't display korean characters in JDK 1.5.0_17
              DarrylBurke
              Moderator advice: Please don't post in threads that are long dead and don't hijack another poster's thread. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.

              Moderator action: Locking this thread.

              db