editor2-issues
editor2-issues copied to clipboard
HiDPI scaling support for Linux
Are there any plans to include support for scaling in editor2? I have tried modifying both scale-factor and text-scale-factor keys in dconf to no avail [as seen on the following screenshot].
HiDPI support for Linux is unfortunately missing in JavaFX, however it is coming in JDK9: https://bugs.openjdk.java.net/browse/JDK-8137050
I've tried the latest editor2 release and I'm noticing that it's still not scaled on OpenJDK 9. Are there other steps involved in enabling HiDPI support on Linux?
It's because defold provides it's own jdk (which is 8). There is hope they will migrate to jdk 11 though, since it's a new LTS release.
Everything is still so tiny! +1 for some form of scaling.
By the way, Defold editor migrated to jdk 11 in 2019 and HiDPI works on my Ubuntu
For whatever reason if I set global fractional scaling in gnome 3.36 on Ubuntu 20.04 the Defold editor actually gets smaller the higher the scale goes. :man_shrugging:
So here is the fix.
You need to pass -Dglass.gtk.uiScale=1.25
where 1.25 equals the amount you want to scale by. 1.25 is a nice compromise on a 4K monitor at 100% in gnome.
To do this edit the config
file sitting next to Defold
and find the vmargs
under the [launcher]
section. I simply prepended -Dglass.gtk.uiScale=1.25,
before the -Dfile.encoding=UTF-8
arg.
vmargs = -Dglass.gtk.uiScale=1.25,-Dfile.encoding=UTF-8,-Djna.nosys=true,-Ddefold.launcherpath=${bootstrap.launcherpath},-Ddefold.resourcespath=${bootstrap.resourcespath},-Ddefold.version=${build.version},-Ddefold.editor.sha1=${build.editor_sha1},-Ddefold.engine.sha1=${build.engine_sha1},-Ddefold.buildtime=${build.time},-Ddefold.channel=${build.channel},-Djava.net.preferIPv4Stack=true,-Dsun.net.client.defaultConnectTimeout=30000,-Dsun.net.client.defaultReadTimeout=30000,-Djogl.texture.notexrect=true,-Dglass.accessible.force=false,--illegal-access=warn,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.desktop/sun.awt=ALL-UNNAMED,--add-opens=java.desktop/sun.java2d.opengl=ALL-UNNAMED,--add-opens=java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED
As discovered by this change here: https://hg.openjdk.java.net/openjfx/9-dev/rt/rev/919f60d167c9#l1.51
Unfortunately upon every upgrade the config gets wiped and I loose my scaling setting. Exposing some kind of UI scale configuration in the editor itself would still be cool.