JDK-2188125 : Chinese Font PMingLiu not rendered correctly
  • Type: Backport
  • Backport of: JDK-6921593
  • Component: client-libs
  • Sub-Component: 2d
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2010-02-05
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u21Fixed 7 b100Fixed
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.
*** (#1 of 1): 2010-02-01 07:19:05 MSK ###@###.###

Comments
EVALUATION Same as main CR.
05-02-2010