linuxjavafxwayland

Can JavaFx support Linux Gnome Wayland fractional scaling?


I downloaded the latest Open JavaFX SDK, 17.0.2 for x64 Linux, and ran the sample HelloFX code using the instructions. I did not make any changes to them.

The problem is that the text looks blurry if fractional scaling is enabled.Is there an easy way to fix this, or is this a limitation of JavaFX that cannot be fixed until the developers of JavaFX do? (Environment = OpenJDK 18, OpenJfx 17.02, Ubuntu 21.10, Gnome 40.4.0, Wayland)

200%, no fractional scaling enter image description here

225%, fractional scaling enter image description here


Solution

  • Fractional scaling is a wayland only feature and only works with native wayland apps. JavaFX, despite using GTK for things, cannot currently run wayland native and fractional scaling does not work correctly in any XWayland apps. This might change soon but not because of JavaFX wayland support, unfortunately. https://www.phoronix.com/news/GNOME-XWayland-Frac-Scaling