Java 9 on Windows with large fonts

If you install large fonts (e.g. 125%, 120 DPI) on Windows, it looks as if Swing from Java 9 first displays a smaller image and then scales that image on the screen.

The text is still displayed correctly. But 1 pixel lines are 1 pixel or 2 pixels thick. The diagonal line is stepped. Icons are rasterized.

Are there any command line or API options to change this behavior?


Editing example:

Using MenuSelectionManagerDemo from docs.oracle.com/javase/tutorial/uiswing/examples/components/

enter image description here

+8
java dpi swing java-9
source share
2 answers

I ran this Swing MenuSelectionManagerDemo using Java 9 and Windows 10, and the problems that arise cause problems. See Two screenshots below, where I ran with the scaling set to 100% and 125% respectively.

As I noted in a comment on the OP, it looks like this was fixed by a JDK bug fix a few months ago, which I believe was raised by the OP:

https://bugs.openjdk.java.net/browse/JDK-8174845

Another small problem that is worth noting is that changing the Windows settings from 100% to 125% is a change in “Scaling and Layout” and “Resizing Text, Applications, and Other Elements ”. (i.e., this is much more than just changing the font, as indicated in the answer to the JDK error.)

one hundred%

125%

+2
source share

I found that in Oracle Java 9,10,11,12 and Amazon Corretto Java LTS (jdk 11.0.2_9) and the problem of rasterization with icons / pictures is still valid and not fixed! Is this patch merged with trunk actually?

The latest version where this problem did not occur is Java 8.0_202, where everything is still going well.

+1
source share

All Articles