Bug 489909 - Font settings not applied to Qt5 apps
Summary: Font settings not applied to Qt5 apps
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.1.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-08 09:34 UTC by Kisaragi Hiu
Modified: 2024-07-09 07:49 UTC (History)
2 users (show)

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


Attachments
An example of the problem showing how font settings are applied in Qt6 apps but not in Qt5 apps (680.85 KB, image/png)
2024-07-08 09:34 UTC, Kisaragi Hiu
Details
The same example but with annotations (581.20 KB, image/png)
2024-07-08 09:36 UTC, Kisaragi Hiu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kisaragi Hiu 2024-07-08 09:34:16 UTC
Created attachment 171473 [details]
An example of the problem showing how font settings are applied in Qt6 apps but not in Qt5 apps

SUMMARY
Font settings are not applied to Qt5 apps. This includes the font family and the font size.

This happened somewhat recently, at some point after Plasma 6.0.

STEPS TO REPRODUCE
1. Set the system font to something that differs from whatever Qt5 falls back to, like Noto Sans at 11pt.
2. Open a Qt5 app, like VLC, Lokalize, or Krita
3. Open a Qt6 app like Dolphin as control

OBSERVED RESULT
Font settings are not applied to Qt5 apps, and they fall back to a default font configuration, which is probably Sans 9pt.
In Qt6 apps it continues to be applied normally.

EXPECTED RESULT
Font settings, including font size, continues to be applied to Qt5 apps.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux (6.6.37-1-lts)
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
(Qt5 Version: 5.15.14+kde+r141)

ADDITIONAL INFORMATION
For every app where this bug affects, this message appears:

    QFont::fromString: Invalid description 'Noto Sans,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
    QFont::fromString: Invalid description 'Noto Sans,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,regular'
    QFont::fromString: Invalid description 'Noto Sans,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,regular'

(Substitude "Noto Sans" and "11" for the general font family and size chosen in the Fonts KCM)
Comment 1 Kisaragi Hiu 2024-07-08 09:36:20 UTC
Created attachment 171474 [details]
The same example but with annotations
Comment 2 Kisaragi Hiu 2024-07-08 09:42:36 UTC
This happens on both X11 and Wayland.

This is probably different from BUG 485957. In that bug, VLC's UI appears to still use the configured fonts (apart from tooltips, which is the essence of that bug), whereas in the issue I'm facing is that the configured fonts do not apply anywhere within Qt5 apps.
Comment 3 Nicolas Fella 2024-07-08 10:39:37 UTC
Is plasma5-integration installed?
Comment 4 Kisaragi Hiu 2024-07-09 07:49:34 UTC
It isn't! Installing plasma5-integration fixed it. I guess this is more a packaging issue, as Arch made it an optional dependency of plasma-workspace.