If you set large fonts (for example, 125%, 120 DPI) on Windows, then it looks as if Swing of Java 9 first renders into a smaller image and then scales this image to the screen.
Text is still properly displayed. But 1 pixel lines are times 1 pixel or 2 pixels strong. A diagonal line is stepped. Icons are rasterized.
Are there any command line parameters or API to change this behavior?
Example Edit:
Using MenuSelectionManagerDemo
from docs.oracle.com/javase/tutorial/uiswing/examples/components/
I ran that Swing MenuSelectionManagerDemo using Java 9 and Windows 10, and the issues you raised appear to be resolved. See the two screen shots below, where I ran with scaling set to 100% and 125% respectively.
As I pointed out in a comment to the OP, it looks like this was resolved by a JDK bug fix several months ago, which I assume was raised by the OP:
https://bugs.openjdk.java.net/browse/JDK-8174845
One other minor point worth noting is that changing the Windows setting from 100% to 125% is a change to "Scale and Layout", and will "Change the size of text, apps and other items". (i.e. It is far more than just a font change, as mentioned in the JDK bug response.)
I found that on Oracle Java 9,10,11,12 and Amazon Corretto Java LTS (jdk 11.0.2_9) and the rasterization problem with icons/pictures are still a valid case and not fixed! Is this bugfix merged to trunk really?
Last version where this problem is not occurred is Java 8.0_202 where still everything goes well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With