Bug 490890

Summary: Small font falling back to (normal font point size - 2) calculation instead of actually reading the value from the KCM
Product: [Frameworks and Libraries] frameworks-kirigami Reporter: Roke Julian Lockhart Beedell <4wy78uwh>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: me, nate, notmart
Priority: NOR    
Version: 6.4.0   
Target Milestone: Not decided   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 6.6
Sentry Crash Report:
Attachments: Example of `kcmshell6 kcm_workspace` with small text.
`kcm_fonts` configuration example, to reproduce it.

Description Roke Julian Lockhart Beedell 2024-07-27 15:21:51 UTC
Created attachment 172042 [details]
Example of `kcmshell6 kcm_workspace` with small text.

SUMMARY  
The "Small" font size set in `kcm_fonts` doesn't appear to be adhered to in any of the KCMs.

STEPS TO REPRODUCE  
*   Invoke `kcmshell6 kcm_fonts`.
*   Set all font sizes the same; especially "Small". I set them to 10pt.
*   Invoke `kcmshell6 kcm_workspace`.

OBSERVED RESULT
The small text remains small (I expect, 50% of the standard font size).

EXPECTED RESULT
They should be identical.

SOFTWARE/OS VERSIONS  
Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.9.10-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 30.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5700
Manufacturer: ASRock
Product Name: X670E Taichi

ADDITIONAL INFORMATION
I've attached some examples.
Comment 1 Roke Julian Lockhart Beedell 2024-07-27 15:22:18 UTC
Created attachment 172043 [details]
`kcm_fonts` configuration example, to reproduce it.
Comment 2 Nate Graham 2024-07-30 20:30:11 UTC
Can confirm. Dig a tiny bit d found the problem. This is what's happening:

https://invent.kde.org/frameworks/kirigami/-/blob/master/src/platform/basictheme.cpp?ref_type=heads#L26-27

"normal font point size - 2" is how the small font is calculated at a basic level when KDE's platform integration bits aren't present. So the problem is that it's not seeing them, or they're not integrating correctly.
Comment 3 Marco Martin 2024-08-05 14:00:14 UTC
Git commit 1700138d1d7cd0d3e87dc3ac20b3bb6c25e86eea by Marco Martin.
Committed on 05/08/2024 at 13:59.
Pushed by mart into branch 'master'.

Read Smallest font settings from the proper config

General group in kdeglobals is uppercase

M  +1    -1    kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp

https://invent.kde.org/frameworks/qqc2-desktop-style/-/commit/1700138d1d7cd0d3e87dc3ac20b3bb6c25e86eea