Since upgrade to 23.05 nerdfonts won't show

Since upgrading to 23.05 (without changing my fontconfig settings in my nixos config and in my home-manager-config, I noticed funny characters in my waybar icons (configured to use nerdfonts UbuntuMono. They appear also wrong in vscode, configured to use CascadiaCode.

With font-manager searching for anything nerd returns nothing, but fc-list | grep -i nerd gives me (the expected) font list.

fc-cache -r helped me with this (I think) problem a couple of weeks ago, maybe try that?

1 Like

Ah, until now I only tried fc-cache --force, I’ll try with -r later.

But, if I understand correctly, it’s actually not how this is supposed to work on nixos? At least in the HM fontconfig module the cache is built at build time to the nix store (immutable), and it appears to look “OK” and shows the expected fonts with fc-list but apps can’t see (some/many of???) them (in any case not any nerd* fonts). I haven’t yet checked the inner workings of nixos’s fonts = ... mechanism.

For this particular issue it doesn’t seem to make a difference whether I install the fonts system-wide or with HM (or both).

PS: I instantiate the nerdfonts package like this (unchanged since before the upgrade):

(nerdfonts.override { fonts = [ "CascadiaCode" "CodeNewRoman" "FantasqueSansMono" "Iosevka" "ShareTechMono" "Hermit" "JetBrainsMono" "FiraCode" "FiraMono" "Hack" "Hasklig" "Ubuntu" "UbuntuMono" ]; })

I had the same issue a month ago, but it was related to the new v3 version of nerdfonts Nerd Fonts - Iconic font aggregator, glyphs/icons collection, & fonts patcher

I guess that with the 23.05 upgrade you switched from nerdfont v2 to v3

Thanks. Indeed, so I had to change the actual icons for waybar.

(I seem to be having two problems at once, one is solved by changing the icons, the other was I think always there (discrepancies/non-functioning HM fonts requiring system-wide installation to actually work, bug: fontconfig via HM doesn't actually work for me (HM installed fonts not seen by applications) · Issue #4048 · nix-community/home-manager · GitHub), but popped up after I had outfactored most user-fonts from the nixos config.)