flandreas / antares

Digital circuit learning platform
49 stars 6 forks source link

Fonts and features too small on HDpi display #699

Closed snhirsch closed 7 months ago

snhirsch commented 7 months ago

Running on Kubuntu 18.04. As with so many Java apps it doesn't play nicely with a high-res display. Fonts are all microscopic. Are there any hidden configuration options or workarounds?

flandreas commented 7 months ago

@snhirsch Thank you for your feedback.

While the hDPI problem with Java apps on Windows and macOS have been solved since Java 11 or so, the situation on Linux seems to be more complex, as it depends also on the desktop manager.

On my Ubuntu 22 with Gnome, I was able to change the scaling using -Dsun.java2d.uiScale=2.0. See https://stackoverflow.com/questions/58699877/how-to-fix-scaling-of-a-java-based-application-on-a-high-dpi-display-in-linux.

In my case, the UI is now scaled by a factor 2.

snhirsch commented 7 months ago

Thanks, Andreas! In the interim I discovered a slightly different workaround that seems to accomplish the correct scaling: $ GDK_SCALE=2.0 /opt/antares/bin/Antares Under KDE this can be done by a quick edit to the .desktop file. Might be worth adding some discussion to the FAQ? (If it's there already and I missed it - shame on me...)

flandreas commented 7 months ago

@snhirsch Thanks for suggesting to add the workaround to the FAQ. I'll do that with the next release update.