Bug 467031 - Icons are too spaced apart when using custom fonts
Summary: Icons are too spaced apart when using custom fonts
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: icons mode (other bugs)
Version First Reported In: 22.12.3
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-07 20:49 UTC by David
Modified: 2025-08-28 13:33 UTC (History)
3 users (show)

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


Attachments
far_from_intersecting (17.44 KB, image/png)
2023-03-07 20:49 UTC, David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2023-03-07 20:49:33 UTC
Created attachment 157096 [details]
far_from_intersecting

SUMMARY
If I select a non-standard font with a large size for the "General" setting, dolphin's icon view will space things very far apart even though text is nowhere near close to intersecting.

STEPS TO REPRODUCE
1. Install font "SF Pro" (from apple) or similar.
2. Go to System Settings -> Appearance -> Global Theme -> Fonts -> General -> select "SF Pro Display" with size 12.
3. Open Dolphin, zoom it a bit out from the default, and set icon view.

OBSERVED RESULT
Entries are too spaced apart from each other. In the screenshot, it puts 3 columns of files/folders with this font, whereas with Noto Sans it puts 5 columns.

EXPECTED RESULT
Entries should not be spaced from each other more than necessary.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-5-amd64 (64-bit)
Graphics Platform: X11
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 62.6 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: SLIMBOOK
Product Name: Executive

ADDITIONAL INFORMATION
Comment 1 Frank McLaughlin 2025-08-19 13:12:39 UTC
I was not previously affected by this, but it is now happening to me in 25.08.

Additionally to what David reported a couple of years ago:

- Setting "Label width" to small is visually indistinguishable from setting it to medium.  Spacing does change when I set it to large or huge.  It's like small just doesn't have any effect anymore.

- The size of the font I'm using is quite small, my preview icon size is set to 144 pixels, and I have "Maximum lines" set to unlimited.
Comment 2 Akseli Lahtinen 2025-08-28 13:33:32 UTC
Can confirm the issue can happen with certain fonts. I am unsure if this is bug in our code or Qt Font handling though, or the fonts themselves. The glyphs seem to report larger size than they are for the font calculation methods used to make sure the text has room.

This can happen with geist-font as well: https://github.com/vercel/geist-font

Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.1
Kernel Version: 6.15.10-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600