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

Some fonts in zh can not display correctly

    XMLWordPrintable

Details

    • unknown, sparc
    • solaris_2.6, solaris_7

    Description

      JDK Version: 1.2beta3-F
      Locale: zh
      Platform: Ultra 1
      OS: Solaris 2.6

      Some types of Font in zh can not display correctly. Follwing is the test program.
      =============================t8.java=====================================
      import java.awt.*;
      import java.awt.event.*;


      public class t8 {
      public static void main(String args[]) {
      new t8();
      }

      public t8() {
      Frame f = new Frame("My Window");
      f.addWindowListener(new WindowEventHandler());
      Label lb1 = new Label("Font1: Dialog");
      Label lb2 = new Label("Font2: Helvetica");
      Label lb3 = new Label("Font3: TimesRoman");
      Label lb4 = new Label("Font4: Courier");
      Label lb5 = new Label("Font5: ZapfDingbats");

      Button bt1 = new Button(" ");
      Button bt2 = new Button(" ");
      Button bt3 = new Button(" ");
      Button bt4 = new Button(" ");
      Button bt5 = new Button(" ");

      bt1.setFont(new Font("Dialog", Font.PLAIN, 18));
      bt2.setFont(new Font("Helvetica", Font.PLAIN, 18));
      bt3.setFont(new Font("TimesRoman", Font.PLAIN, 18));
      bt4.setFont(new Font("Courier", Font.PLAIN, 18));
      bt5.setFont(new Font("ZapfDingbats", Font.PLAIN, 18));

      String s = "ENGLISH:ËóË´";

      bt1.setLabel(s);
      bt2.setLabel(s);
      bt3.setLabel(s);
      bt4.setLabel(s);
      bt5.setLabel(s);

      f.setLayout(new GridLayout(5, 2));
      f.add(lb1); f.add(bt1);
      f.add(lb2); f.add(bt2);
      f.add(lb3); f.add(bt3);
      f.add(lb4); f.add(bt4);
      f.add(lb5); f.add(bt5);

      f.pack();
      f.setVisible(true);
      }

      class WindowEventHandler extends WindowAdapter {
      public void windowClosing(WindowEvent e) {
      System.exit(0);
      }
      }
      }
      ===========================================================================
      run this program, you will find that
      String with dialog Font is correct, while with Helvetica, TimesRoman, Courier, ZapfDingbats Fonts can not be displayed corectly.

      jim.hu@prc 1998-02-11

      Attachments

        Activity

          People

            sherman Xueming Shen
            jhusunw Jim Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: