As I have written, I’m using “Oh-My-Zsh” with Nerd icons and fonts. It has always worked perfectly in KDE.
A few days ago, KDE Plasma 6 landed in Arch (and thus, EndeavourOS), and after upgrading, the Nerd fonts were not displayed in Konsole and Kate (and, I guess, in other KDE applications).
For example, before upgrading, Konsole looked like that:
After upgrading all the nice Nerd fonts were gone:
I reported that on the EndeavourOS forum and linked the corresponding KDE bug. It looks like it is due to an intentional change in Qt6. The Qt6 issue is https://bugreports.qt.io/browse/QTBUG-110502. The issue was fixed here: https://code.qt.io/cgit/qt/qtbase.git/commit/?id=a44b6950268214d802bc7ce7df09975261263e31, leading to this new behavior, which breaks the old behavior.
Long story short, before, when a font did not provide support for a “glyph”, that missing glyph was looked up in other fonts. After that change, that does not happen anymore.
The default monospace font in KDE is “Hack”. I have installed other Nerd fonts, but not the “Hack Nerd” version, so what worked before the upgrade no longer works.
To fix the problem, I Installed the nerd font, e.g., for Hack (the default KDE font):
1 |
sudo pacman -S ttf-hack-nerd |
Then, open “System Settings” -> “Fonts”, and change the “Fixed width” font from the default “Hack 10pt” to the corresponding Nerd font:
Restart Konsole and the Nerd fonts are back:
Note that this works if your Konsole profile does not have a custom font set; if you use another font, you’ll have to use the Nerd font corresponding to that font.
For example, I used JetBrains fonts in another Konsole profile, but I hadn’t installed the Nerd version:
1 2 3 4 |
extra/ttf-jetbrains-mono 2.304-1 [installed] Typeface for developers, by JetBrains extra/ttf-jetbrains-mono-nerd 3.1.1-1 (nerd-fonts) Patched font JetBrains Mono from nerd fonts library |
I installed the Nerd version and changed the font from simply “JetBrains” to the Nerd version, and also, this profile was fixed:
The same holds for other KDE applications like Kate. If you haven’t set a custom font, then the Nerd version of Hack will be automatically used. Otherwise, you have to use the Nerd version of the specified font.
Note that other non-Qt applications will not be affected by this change. For example, for Alacritty, I have this section in its configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[font] size = 10.0 [font.bold] family = "JetBrains Mono NL" style = "Bold" [font.bold_italic] family = "JetBrains Mono NL" style = "Bold Italic" [font.italic] family = "JetBrains Mono NL" style = "Italic" [font.normal] family = "JetBrains Mono NL" style = "Regular" |
So, I simply specify JetBrains, not its Nerd version. Still, when icons and other glyphs are to be rendered, they are automatically taken from any Nerd font providing those glyphs:
Good-looking Nerd fonts are back! 🙂
Awesome. Had exactly the same issue. Thanks for taking your time to write up the solution 🙂