From 003d33f951fa6e78d46403ebe07572f2b223f142 Mon Sep 17 00:00:00 2001 From: A Samuel Pottinger Date: Fri, 22 Nov 2019 16:53:48 -0800 Subject: [PATCH] Turn off UI scaling for windows. Frustratingly, use of prior Processing WindowsPlatform code for detecting DPI causes UI scaling to turn off and yields a DPI of 96 regardless of windows display scaling. However, in the current WindowsPlatform, UI scaling is enabled but text size calculation within custom rendering swing elements is incorrect, possibly because there is scaling happening underneath transparently. This causes x positions to be inflated at 125% scaling, for example. On a whole, Windows itself does not recommend scaling other than 100% inside the settings UI and that UI scaling within Java itself makes the custom UI elements look bad. So, this suggests disabling the ui scaling in Java for the editor, leaving the opportunity for Processing to find a new way to detect system scaling in the future and handling it internally. At this time, sketches still seem to be calculating positions correctly though they do appear pixelated with display scaling. Therefore, they are left alone. --- build/windows/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/windows/config.xml b/build/windows/config.xml index e2ff35461..e9cd8be17 100755 --- a/build/windows/config.xml +++ b/build/windows/config.xml @@ -30,6 +30,9 @@ -Djna.nosys=true + + + -Dsun.java2d.uiScale.enabled=false