SUMMARY Flatpaks using the KDE platform only use greyscale antialiasing. STEPS TO REPRODUCE 1. Install flatpak app using the KDE platform (I tried with OBS from flathub and Massif-Visualizer from kdeapps) 2. Launch the app OBSERVED RESULT All font rendering in the app uses grayscale antialiasing EXPECTED RESULT Fonts are rendered properly, including RGB antialiasing SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.21.5 (host) KDE Frameworks Version: 5.81.0 (host and sandbox) Qt Version: 5.15.2 (host), "5.15.3" (sandbox)
A possibly relevant merge request was started @ https://invent.kde.org/packaging/flatpak-kde-runtime/-/merge_requests/52
Git commit 41108d25592dfff573717310670997f3e9c9d2f6 by Alois Wohlschlager. Committed on 09/07/2021 at 14:07. Pushed by apol into branch 'qt5.15lts'. Allow reading fontconfig settings from host Fontconfig settings were not visible inside the sandbox, leading to subpar font rendering. Make the host settings available to flatpaked apps to enable better font rendering. M +1 -0 org.kde.Sdk.json.in https://invent.kde.org/packaging/flatpak-kde-runtime/commit/41108d25592dfff573717310670997f3e9c9d2f6
Reverted the commit as it's an issue upstream: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1274
The issue you referring to is about metric-compatible fonts in runtime, not about font rendering settings passthrough. I don't think they can solve that, though, since fontconfig file format is incompatible between versions and host configs will refer to host directories. Looks like gtk uses XSETTINGS on X11 and portals on Wayland to get rendering settings via sandbox. I believe Qt QPA should be reorganized to get font rendering settings from platformtheme layer. That way, it will be able to get font rendering settings from gtk on gtk based DEs and from Plasma configs (via portals if running inside flatpak) on Plasma.
Would be nice if someone helped with reviewing this Qt change as it would fix the bug on X11 https://codereview.qt-project.org/c/qt/qtbase/+/343628