Summary: | Konsole forces full hinting (hintfull) despite both fontconfig and KDE settings | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Boris B. <borisb.bgd> |
Component: | font | Assignee: | Konsole Developer <konsole-devel> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | andrea.ippo, christian, CoelacanthusHex, kde, ninjalj, vasyl.demin, yumpusamongus+kde, zawertun |
Priority: | NOR | Keywords: | qt6 |
Version: | 24.02.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Discrepancy between font rendering in the selection dialog vs the actual Konsole (in the background).
konsole with forced hinting vs foot with hintnone an alternative fix that doesn't override fontconfig |
Description
Boris B.
2024-03-05 17:44:59 UTC
Oh, maybe this explains why some of my favorite monospaced fonts look crappy now. E.g. Red Hat Mono, Source Code Pro This was done because Qt6 removed QFont::ForceIntegerMetrics, which was what previous konsole versions used to force glyphs to conform to the character cell grid of a terminal. Now, on Qt6, we enable full hinting for the same reason, see https://invent.kde.org/utilities/konsole/-/merge_requests/911 Ah, maybe this is what I'm seeing then. I upgraded to Fedora 40, so Plasma 6, and the Konsole rendering of my go-to font (Inconsolata) has changed a fair bit and no longer matches the preview in the font selection dialog. It looks like bold got turned on by accident. I'm attaching a screenshot. Created attachment 170021 [details]
Discrepancy between font rendering in the selection dialog vs the actual Konsole (in the background).
Created attachment 170072 [details] konsole with forced hinting vs foot with hintnone In that MR, the comparison screenshot looks to have been made at 2x scale. For those of us with fewer pixels to throw at the problem, the effect of hinting is rather drastic. Observe the misshapen "f", the slight heaviness to the horizontal strokes (including double-thicc bold "n"), and the vague sense that everything is struck-through. The attached screenshot is *after* I increased the line spacing setting to 1px to make the vertical height match the unhinted Foot terminal. Anyhow, I though Freetype removed full hinting several years ago, and only supports "none" and "slight", which is hinting in the vertical axis only. That might explain why Nate encountered bug 476768? (In reply to ninjalj from comment #2) > https://invent.kde.org/utilities/konsole/-/merge_requests/911 I reverted this misguided hack, and now my Konsole respects my fontconfig again. Thanks for the tip. Now I'm wondering if Kate/KWrite's newly uglified font rendering in KDE 6 has the same root causeā¦ Created attachment 171664 [details]
an alternative fix that doesn't override fontconfig
To fix the original issue without overriding the user's font configuration, the letter spacing can be adjusted to force the horizontal advance to be an integer. See the attached patch, which completely fixes the issue on my system. I now have a normal terminal font with full hinting, a bold variant of it with no hinting, and no weird space issues. In other words, Konsole's appearance now matches how it was in KDE 5.
|