Bug 443576

Summary: When increase the font size, the padding increase is too much
Product: [Plasma] plasmashell Reporter: Felipe Kinoshita <kinofhek>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.22.5   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: image showing observed result

Description Felipe Kinoshita 2021-10-10 22:45:33 UTC
Created attachment 142321 [details]
image showing observed result

when you increase the font size the padding around UI element also increase, the problem is, the padding increase too much.

STEPS TO REPRODUCE
1. Increase the font size by one point
2. Look at the UI

OBSERVED RESULT
Padding is way bigger than it should be, we just increase the font size from x to x + 1

EXPECTED RESULT
Padding should not be that different from what it was

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora KDE 34
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Comment 1 Nate Graham 2021-10-18 02:44:55 UTC
So you're going from Noto Sans 10 to 11, right? In this case, the issue is actually in Noto Sans itself, believe it or not. The issue is that the metrics of Noto Sans 11pt are about 22% bigger than the metrics of Noto Sans 10pt, rather than 10% bigger.

As you're aware, tons of things in Plasma respect the font size by deriving their size directly from the font metrics, or by using GridUnit, LargeSpacing, or another common unit, all of which also take into consideration the font size.

As a result, going to Noto Sans 11pt makes everything 22% bigger rather than 10% bigger, which is what you expect. If you change the font to something else without this weirdly huge jump in the size between 10 and 11, you'll get the sizing you expect.

The correct fix would be in Noto Sans itself, believe it or not. There isn't anything we can do in KDE code to work around it short of using a different default font.
Comment 2 Felipe Kinoshita 2021-10-18 02:57:14 UTC
Interesting, thank you for the explanation :)
Comment 3 Nate Graham 2021-10-18 03:02:00 UTC
Indeed, it is quite interesting, and not at all obvious!

I'm actually taking advantage of this bug to work around a deficiency of my hardware. My 14" 4K screen's optimal scale is around 250%, but if I set it to that, things would be blurry. So I use 200% scale with 11pt Noto Sans which makes everything 22% bigger. This gives me roughly the same effect as 244% scale with nice crisp lines. :)