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

Font renders incorrectly for wide characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.2
    • client-libs
    • None
    • 2d
    • unknown
    • windows_nt

      SYSTEM INFORMATION:
      Win32

      The problem is when a wide character like "W" displays as the first character
      in a line, "W" will not be displayed properly, left partial of the character
      is missing.

      Following is the testcase which demonstrates the problem:
      TEST CASE:

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


      public class FontBugExample
      {
          public static final Font DEF_FONT = new Font( "SanSerif", Font.PLAIN, 11
      );

          public static void main(String [] args)
          {
              JFrame f = new JFrame();

              JTextField jt = new JTextField("Welcome");
              jt.setFont(DEF_FONT);

              f.getContentPane().add(new JLabel("Part of the W is being renderered
      in the previous Cell"),BorderLayout.NORTH);
              f.getContentPane().add(jt, BorderLayout.SOUTH);

              f.setSize(400,100);
              f.setVisible(true);

              f.addWindowListener( new WindowAdapter()
      {
      public void windowClosing( WindowEvent e )
      {
      System.exit(0);
      }
      } );
          }
      }


      JUSTIFICATION:

      We urgently need to ship a fix to this problem to get the issue resolved
      with our customer. Our primary system is a large enterprise financial system with a Web interface written in Java, using 1.2.2.04. It is an expensive top of the range system and our customers are _very_ demanding.

      I realise that this appears to be a cosmetic problem, but the customer
      involved is digging their heels in and is demanding a fix. They refuse to
      use another font (they are a Swedish company, so maybe the problem looks
      worse in Swedish?).

            pkejriwasunw Parry Kejriwal (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: