Korean chars do not display in TextField with Serif/Monospaced BOLD font

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P2
    • None
    • Affects Version/s: 1.1.6
    • Component/s: client-libs
    • None

      textField.setFont(new Font("Serif",Font.BOLD,12));
      cannot display Korean characters only

      and

      textField.setFont(new Font("Monospaced",Font.BOLD,12));
      cannot display English and Korean characters

      The same string can display fine with "SanSerif" and "Dialog" font.

      Here is the test program to reproduce this problem;

      ----
      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,12));

              setLayout(new BorderLayout());
              add("South",button);
              add("North",textField);
              textField.setText(string);
              pack();
          }

          public static void main(String[] args)
          {
              KoreanTextFieldBugTest koreanTextFieldBugTestMonospaced = new KoreanText
      FieldBugTest("Monospaced");
              koreanTextFieldBugTestMonospaced.show();
              KoreanTextFieldBugTest koreanTextFieldBugTestSansSerif = new KoreanTextF
      ieldBugTest("SansSerif");
              koreanTextFieldBugTestSansSerif.show();
              KoreanTextFieldBugTest koreanTextFieldBugTestSerif = new KoreanTextField
      BugTest("Serif");
              koreanTextFieldBugTestSerif.show();
              KoreanTextFieldBugTest koreanTextFieldBugTestDialog = new KoreanTextFiel
      dBugTest("Dialog");
              koreanTextFieldBugTestDialog.show();
          }
      }

            Assignee:
            Xueming Shen
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: