JDK-8157838 : Personalized Windows Font Size is not taken into account in Java8u102
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8u102
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2016-05-23
  • Updated: 2016-10-13
  • Resolved: 2016-06-02
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 8
8u102Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_102-ea"
Java(TM) SE Runtime Environment (build 1.8.0_102-ea-b04)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b04, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Versi��n 6.1.7601]

A DESCRIPTION OF THE PROBLEM :
I have personalized window font size to 125%. In Java7 and other versions prior to Java8u102 , my Java application shows font resized in this percent, so this is Ok.  But with Java8u102, the same application show small font size, like 100% without taking into account my windows settings.



REGRESSION.  Last worked in version 8u92

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Simply type and run the following program:

import javax.swing.JOptionPane;
import javax.swing.UIManager;

import junit.framework.TestCase;

public class TestFonts extends TestCase {

	
	public void testFont() throws Exception {
		UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		JOptionPane.showMessageDialog(null, "Testing " + UIManager.getSystemLookAndFeelClassName() + "...");
	}
}

Yo will get different results from Java7 for example and Java8u102


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
I don't know so far.


Comments
AWT Nightly testing for the binaries with the fix is OK. SQE OK to take it to PSU16_03
03-06-2016

Request: http://mail.openjdk.java.net/pipermail/jdk8u-dev/2016-June/005560.html
01-06-2016

- webrev link: http://cr.openjdk.java.net/~alexsch/8157838/webrev.00/ - review link: http://mail.openjdk.java.net/pipermail/awt-dev/2016-May/011396.html - issue impact: Windows L&F font size is not scaled when personalized window font size is set to 125% - fix rational: the fix JDK-8076545 scales Windows L&F font size down so that it was not so big on Windows 10 with Windows scaling level 300%. But it affects Windows 7 and Windows 8.1 with Windows scaling level 125%. The suggested fix is just revert the fix JDK-8076545 for JDK 8u so the behavior was the same as before the fix. -risks: minimal -suggested testing: run SwingSet2 demo with Windows L&F on Windows 7, 8.1 or 10 with personalized window font size to 125%.
31-05-2016

The proposed fix: http://cr.openjdk.java.net/~alexsch/8157838/webrev.00/ Review thread: http://mail.openjdk.java.net/pipermail/awt-dev/2016-May/011359.html
27-05-2016

> This is not a problem for JDK 9 Given that in 9 we may yet decide that 150% is the minimum threshhold for scaling, then this would be a bug in 9 too in that case. In fact this is quite a likely scenario as I don't think 125% is worth scaling in 9. So we need a more sophisticated fix that will address that as part of also not regressing the fix for 8076545.
27-05-2016

Windows provides scaled font sizes when it is personalized to 125% or 150%. JDK 8 does not include support for HiDPI displays. This leads that the window size is not scaled in JDK 8 and font for Windows L&F is bigger than font for Metal and other L&Fs. The fix JDK-8076545 scales font sizes down and window size and Windows L&F font sizes are now consistent with whole app. This is not a problem for JDK 9 because it scales both application and font and font have right sizes for personalized Windows OS. The JDK 8 can't scale an app so window font size are not scaled up. I suggest just revert-back the fix JDK-8076545 for JDK 8u only so it works as before the fix.
27-05-2016

Does it affect 9?
25-05-2016

I think this is probably a regression from this changeset :- http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/411e42b16d22
25-05-2016