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

Incorrectly Monospaced font rendering with JRE 1.6.0_17 & above

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 6u10, 6u17
    • client-libs
    • 2d
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.6.0_17"
      Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
      Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]



      A DESCRIPTION OF THE PROBLEM :
          The attached program runs incorrectly with JRE 1.6.0_17 or above on Traditional Chinese Windows XP. Some characters are invisible when smaller-sized or bigger-sized monospaced fonts are used. It runs normally with English WinXP or JRE version prior to 1.6.0_17.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and run the test case source code below.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      All characters are visible when rendered with any font size and any font name.
      ACTUAL -
      Some characters are invisible when rendered with smaller-sized or bigger-sized monospaced fonts.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.JLabel;
      import javax.swing.BoxLayout;
      public class JreFontBug extends javax.swing.JFrame {
        public static void main(String[] args) {
          JreFontBug inst = new JreFontBug();
          inst.setVisible(true);
        }
        public JreFontBug() {
          super();
          initGUI();
        }
        private void initGUI() {
          try {
            BoxLayout thisLayout = new BoxLayout(this.getContentPane(), javax.swing.BoxLayout.Y_AXIS);
            this.getContentPane().setLayout(thisLayout);
            for (int size = 6; size < 24; size++) {
              {
                JLabel jLabel1 = new JLabel();
                this.getContentPane().add(jLabel1);
             // jLabel1.setFont(new java.awt.Font("Dialog",0,size)); // is OK
             jLabel1.setFont(new java.awt.Font("Monospaced", 0, size)); // is ERROR
                jLabel1.setText("1234567890-=~!@#$%^&*()_+ABCDEFGHIJKLMNOPQRSTUVWXYZ");
               }
            }
              setSize(500, 500);
          } catch (Exception e) {
            e.printStackTrace();
          }
        }
      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Use JRE version prior to 1.6.0_17

      Release Regression From : 6u16
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            igor Igor Nekrestyanov (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: