United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6921593 Chinese Font PMingLiu not rendered correctly
JDK-6921593 : Chinese Font PMingLiu not rendered correctly

Details
Type:
Bug
Submit Date:
2010-02-01
Status:
Closed
Updated Date:
2010-07-07
Project Name:
JDK
Resolved Date:
2010-07-07
Component:
client-libs
OS:
windows_vista,windows_xp
Sub-Component:
2d
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u10,6u17,6u18
Fixed Versions:
6u21 (b01)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Duplicate:
Duplicate:
Relates:
Relates:

Sub Tasks

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.

                                    

Comments
EVALUATION

I can reporduce this with 6u18 using MingLiu font from WinXP.
Interestingly but Vista has next revision of the font and it does not have this issue ...
                                     
2010-02-02
EVALUATION

This problem is caused by fix for 6815780.

We used to check for "any of glyph contours has at least on point" but after moving this condition into the loop 
we now check for "ALL glyph contours have at least one point".

Apparently some glyphs have occasional empty contours, including some versions of MingLiu font.
                                     
2010-02-02



Hardware and Software, Engineered to Work Together