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

Chinese Font PMingLiu not rendered correctly

    XMLWordPrintable

Details

    • 2d
    • b01
    • b01
    • x86
    • windows_xp, windows_vista
    • Verified

    Backports

      Description

        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]

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        PMingLiu font is installed properly.

        A DESCRIPTION OF THE PROBLEM :
        The chinese font "PMingLiu" not rendered correctly after update to 1.6.0_u17 from 1.6.0_u15.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Compile and run the program, you should see a correct rendering of the four label with text "supplier name chinese".

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Compile and run the program, you should see a correct rendering of the four label with text "supplier name chinese".
        ACTUAL -
        font size with 14.0f and 18.0f cannot be rendered correctly.
        Usually, only left the text "s r c s "

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        import java.awt.Font;

        import javax.swing.Box;
        import javax.swing.BoxLayout;
        import javax.swing.JFrame;
        import javax.swing.JLabel;
        import javax.swing.JPanel;

        public class FontScaleTester {
        public static void main(String[] args) {
        JFrame frame = new JFrame();
        JPanel panel = (JPanel) frame.getContentPane();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
        Box box = Box.createVerticalBox();

        box.add(createLabel("PMingLiu", 12.0f));
        box.add(createLabel("PMingLiu", 14.0f));
        box.add(createLabel("PMingLiu", 16.0f));
        box.add(createLabel("PMingLiu", 18.0f));
        panel.add(box);
        frame.pack();
        frame.setVisible(true);

        }

        static JLabel createLabel(String fontname, float size) {
        JLabel label = new JLabel("supplier name chinese");
        Font newFont = new Font(fontname, Font.PLAIN, 12).deriveFont(size);
        label.setFont(newFont);
        return label;
        }
        }

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

        CUSTOMER SUBMITTED WORKAROUND :
        I don't have any workaround yet. Please fix it.

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: