Bug 436864 - Grayscale antialiasing in apps using KDE Platform
Summary: Grayscale antialiasing in apps using KDE Platform
Status: REOPENED
Alias: None
Product: Qt/KDE Flatpak Runtime
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-10 12:09 UTC by Alois Wohlschlager
Modified: 2024-07-09 19:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alois Wohlschlager 2021-05-10 12:09:29 UTC
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)
Comment 1 Bug Janitor Service 2021-07-09 14:12:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/packaging/flatpak-kde-runtime/-/merge_requests/52
Comment 2 Alois Wohlschlager 2021-07-09 15:02:44 UTC
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
Comment 3 Aleix Pol 2021-07-12 00:23:06 UTC
Reverted the commit as it's an issue upstream:
https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1274
Comment 4 Ilya Fedin 2021-07-16 02:19:53 UTC
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.
Comment 5 Ilya Fedin 2022-02-12 09:17:16 UTC
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