Bug 407194 - Honor system font scaling setting
Summary: Honor system font scaling setting
Status: RESOLVED UPSTREAM
Alias: None
Product: Qt/KDE Flatpak Runtime
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2019-05-03 20:09 UTC by Iiro Laiho
Modified: 2019-05-06 08:06 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iiro Laiho 2019-05-03 20:09:53 UTC
SUMMARY
KDE flatpak apps do not seem to honor system font scaling setting. I run Gnome 3 as the host DE and have increased the font size from Gnome's tweak tool. When I run Qt/KDE apps installed via Flatpak (have tested VLC and KeePassXC from Flathub as well as Okular from kdeapps), the apps stubbornly display the default font size instead of the one I have choosed. The problem does not seem to extend to GTK flatpak apps. Also, Qt apps installed from system repository work fine.

This problem has been evident for quite a while (1) but there doesn't seem to be a formal bug report yet. Font scaling is important for not only those with high DPI displays, but also those with visual impairment. There are strong ethical obligations towards and in some locales even legal obligations to keep accessibility in mind. Please take this seriously.

1) https://www.reddit.com/r/kde/comments/910awy/how_to_make_kde_flatpak_apps_respect_font_settings/

STEPS TO REPRODUCE
1. Run Gnome DE and set the font scaling to e. g. 1.4 from the tweak-tool
2. Install some Qt/KDE flatpak app
3. Run the app and inspect the font size

OBSERVED RESULT
The default size font is displayed

EXPECTED RESULT
The font size should be bigger as set from the tweak-tool

SOFTWARE/OS VERSIONS
CentOS 7, Fedora 30

ADDITIONAL INFORMATION
Comment 1 Aleix Pol 2019-05-03 23:15:36 UTC
This will need some investigation because for me it works fine on Plasma+Wayland.
Comment 2 David Edmundson 2019-05-03 23:26:00 UTC
What does tweak tool actually set?
Comment 3 Aleix Pol 2019-05-03 23:38:32 UTC
Can you make sure you have org.kde.PlatformTheme.QGnomePlatform installed? 

It could make sense to have this issue tracked in there https://github.com/flathub/org.kde.PlatformTheme.QGnomePlatform
Comment 4 Iiro Laiho 2019-05-05 08:32:22 UTC
(In reply to Aleix Pol from comment #3)
> Can you make sure you have org.kde.PlatformTheme.QGnomePlatform installed? 
> 
> It could make sense to have this issue tracked in there
> https://github.com/flathub/org.kde.PlatformTheme.QGnomePlatform

$ flatpak list | grep QGnomePlatform
org.kde.PlatformTheme.QGnomePlatform/x86_64/5.12	system,runtime

I installed it manually when investigating this issue, but it didn't have any visible effect.

(In reply to David Edmundson from comment #2)
> What does tweak tool actually set?

Gnome internally stores it as "org.gnome.desktop.interface text-scaling-factor" in gsettings. It also influences the Xft.dpi Xresource.

$ gsettings get org.gnome.desktop.interface text-scaling-factor
1.3999999999999999
$ xrdb -query | grep dpi
Xft.dpi:	134.3994140625
Comment 5 Jan Grulich 2019-05-06 08:05:41 UTC
It looks it depends on the value you set to font-scaling, if I use 1.4, then it doesn't work, but if I use 1.5 then it scales. There is some logic apparently in Qt doing this work based on DPI. We used to do scaling in QGnomePlatform, but it was removed because of this Qt behavior. It looks it wasn't a good decision to drop it completely and we will need to just implement it properly.

See: https://github.com/FedoraQt/QGnomePlatform/commit/687c74e175d1acc84de075f8f13180d78ef8391e

Please open a bug for QGnomePlatform as this has nothing to do with KDE.
Comment 6 Jan Grulich 2019-05-06 08:06:29 UTC
Just for the record, I have same behavior for non-flatpak Qt/KDE apps.