Bug 434814 - Fonts with a very tall baseline cause text to overflow into the next cell
Summary: Fonts with a very tall baseline cause text to overflow into the next cell
Status: ASSIGNED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Widget Explorer sidebar (other bugs)
Version First Reported In: 5.20.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-23 05:02 UTC by Lucas
Modified: 2025-09-24 14:23 UTC (History)
1 user (show)

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


Attachments
Unaligned text that overflows into other widgets (351.18 KB, image/png)
2021-03-23 05:02 UTC, Lucas
Details
Fonts I am using on my PC (37.95 KB, image/png)
2021-03-23 23:14 UTC, Lucas
Details
Seems it might be happening with the colors page too with settings (463.11 KB, image/png)
2021-03-25 23:35 UTC, Lucas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas 2021-03-23 05:02:26 UTC
Created attachment 136970 [details]
Unaligned text that overflows into other widgets

SUMMARY
When widgets have long descriptions, other buttons will overlap the text.

STEPS TO REPRODUCE
1. Open widget explorer

OBSERVED RESULT
1. Widgets with long descriptions have text that overflows onto other buttons

EXPECTED RESULT
1. The overflowed text should scroll on hover, or there should be a limit as to how long the description can be, or the other buttons need to move down lower to give enough space. There are multiple ways to resolve this problem.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-03-23 12:58:35 UTC
What font sizes are you using? Looks like something smaller than normal?
Comment 2 Lucas 2021-03-23 23:14:22 UTC
Created attachment 137003 [details]
Fonts I am using on my PC
Comment 3 Nate Graham 2021-03-24 18:00:32 UTC
Hmm, all default.
Comment 4 Nate Graham 2021-03-24 18:05:53 UTC
Being somewhat familiar with the layout code here, the fact that this can happen is not 100% surprising to me, but nonetheless I can't seem to make it happen. I think the problem here is the line spacing between text items. It's much larger in your screenshot than it is on my system. No idea why though.

Do you see the same very tall line spacing in other multi-line text in Plasma, or is it only in the Widget Explorer?
Comment 5 Lucas 2021-03-25 23:35:09 UTC
Created attachment 137067 [details]
Seems it might be happening with the colors page too with settings
Comment 6 Lucas 2021-03-25 23:37:10 UTC
Do the labels also appear on top of the buttons on your computer? (Note: this is on the settings page for colors.)
Besides this, I can't find any other potential place in Plasma where the same problem could be happening as with the widget explorer.
Comment 7 Nate Graham 2021-03-25 23:38:36 UTC
Yeah there is definitely something weird with your font's baseline. No, it's not happening to me.

What happens if you switch the "Normal" font to something else, and then back again?
Comment 8 Lucas 2021-03-26 00:01:20 UTC
The problem is now fixed.
Solution: After changing the font, I tried to change it back but realized that the option was unavailable. The original font that I was using was called Noto Sans. It was available, but called by different names such as "Noto Sans CJK HK" and "Noto Sans CJK JP." The plain option "Noto Sans" wasn't any of the choices. My fixed width font was called "Hack" but no longer exists. I am not sure why these fonts don't exist anymore since I never changed the settings for the fonts. It seems they got corrupted somehow over time from the updates. Strange. Maybe the real bug here is that fonts disappeared and the system thinks we're using the now non-existent fonts?
Comment 9 Nate Graham 2021-03-26 01:28:13 UTC
I had a feeling it was related to fonts.

I'm glad it's fixed for you now, but we still need to fix this layout problem for everyone else who happens to be using a font like this. :)
Comment 10 Lucas 2021-03-26 01:48:41 UTC
One thing that I noticed is that everything changed on my system. Not just the widget explorer. I'm talking every single app, including non-KDE apps. My system looks completely different now. Buttons are smaller. Everything looks like it shrunk after resetting the fonts. The Application Launcher buttons are smaller, context menus are smaller, toolbars are smaller, etc.
It seems like the resolution changed somehow with the font change.
The only thing that makes sense to me is that maybe for some reason there was a newline character \n with the font which provided extra height to all the UI elements. I don't know why else this would happen.
Comment 11 Nate Graham 2021-03-26 02:26:09 UTC
In Plasma and QML-based apps, the size of practically everything is based on the metrics of the current font--including the baseline height. So if you use a font with a very tall baseline, everything will be bigger. That's what was going on.
Comment 12 Bug Janitor Service 2025-09-24 14:23:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3204