Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4157965

11x: [solaris]Korean chars can not display in TextField with all fonts at 18 p

XMLWordPrintable

    • generic, sparc
    • solaris_2.6, solaris_9

      textField.setFont(new Font(<fontname>,Font.BOLD,18));

      cannot display any of Korean characters in Solaris 2.7 build 18.

      To reproduce this problem,
      Run the following example program in korean locale.

      ---
      import java.awt.*;
      import java.text.*;
      import java.util.*;

      class KoreanTextFieldBugTest extends Frame
      {
          static String string="Actions: \uc791\uc5c5"; // Simultaneously display ISO 8859-1 and KSC5601

          public KoreanTextFieldBugTest(String fontNm)
          {
              super(fontNm);
              Button button = new Button(string);
              TextField textField = new TextField(20);
              textField.setFont(new Font(fontNm,Font.BOLD,18));

              setLayout(new BorderLayout());
              add("South",button);
              add("North",textField);
              textField.setText(string);
              pack();
          }
          public static void main(String[] args)
          {
              KoreanTextFieldBugTest koreanTextFieldBugTestMonospaced = new KoreanTextFieldBugTest("Monospaced");
              koreanTextFieldBugTestMonospaced.show();
              KoreanTextFieldBugTest koreanTextFieldBugTestSansSerif = new KoreanTextFieldBugTest("SansSerif");
              koreanTextFieldBugTestSansSerif.show();
              KoreanTextFieldBugTest koreanTextFieldBugTestSerif = new KoreanTextFieldBugTest("Serif");
              koreanTextFieldBugTestSerif.show();
              KoreanTextFieldBugTest koreanTextFieldBugTestDialog = new KoreanTextFieldBugTest("Dialog");
              koreanTextFieldBugTestDialog.show();
          }
      }

      ----

      The font names in /usr/java/lib/fonts.properties.ko files seems need to be
      changed.
      To use scalable fonts from Solaris 2.6, the font typefaces need to be
      changed like following;

      kodig -> roundgothic

      For example,

      fontset.dialog.bold=-b&h-lucida sans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,-sun-kodig-medium-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
           ^^^^^ ^^^^^^

      to

      fontset.dialog.bold=-b&h-lucida sans-bold-r-normal-sans-*-%d-*-*-p-*-iso8859-1,-sun-roundgothic-bold-r-normal--*-%d-*-*-c-*-ksc5601.1987-0
           ^^^^^^^^^^^ ^^^^

      After modifying this, the test program worked fine.

            sherman Xueming Shen
            foliversunw Fred Oliver (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: