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

Glyphs not found in Plain version of font

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.2
    • client-libs
    • 2d
    • merlin
    • x86
    • windows_nt



      Name: skT45625 Date: 07/21/2000


      java version "1.2.2"
      HotSpot VM (1.0.1, mixed mode, build g)

      When running the following program, you should notice that the left side
      contains a greek character and the trademark character (TM). The right side
      contains the greek character and a box, indicating it can't find the
      character. This seems odd, since the only difference between the two is that
      the button on the left has a BOLD fond and the right is a PLAIN font.

      If I run this program under 1.3, the right side displays both characters as a
      box...(i.e. it's worse)

      import javax.swing.*;
      import java.awt.*;
      import java.util.*;
      import java.awt.event.*;

      public class FontTest
      {
          public static void main( String args[] )
          {
              JFrame frame = new JFrame();
              Container content = frame.getContentPane();
              content.setLayout( new GridLayout( 1, 0 ) );

              JButton button1 = new JButton( "\u03d1\u2122" );
              button1.setFont( new Font( "sansserif", Font.BOLD, 12 ) );
              content.add( button1 );

              JButton button2 = new JButton( "\u03d1\u2122" );
              button2.setFont( new Font( "sansserif", Font.PLAIN, 12 ) );
              content.add( button2 );
              
              frame.pack();
              frame.setVisible( true );
              frame.addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent e) {System.exit(0);}
              } );

              
          }
      }
      (Review ID: 107436)
      ======================================================================

            pkejriwasunw Parry Kejriwal (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: