Nerd Fonts in KDE Plasma 6

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):

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:

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:

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! 🙂

One thought on “Nerd Fonts in KDE Plasma 6

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.