Note: this was discussed in a different post but the solution listed there doesn’t work.
A recent update to the way nerd fonts are packaged broke my kitty config, which contains this line:
font_family family='FiraCode Nerd Font Mono'
I’m on Ubuntu with home-manager. After updating my flake and modifying the nerd front package to match the new syntax, nerd-fonts.fira-code
, kitty fails to start with this output:
fast_data_types.FreeTypeError: Failed to load face from path: /home/jordan/.nix-profile/share/fonts/truetype/NerdFonts/FiraCodeNerdFontMono-Regular.ttf with error: cannot open resource
[0.054] Failed to convert descriptor to face for medium font
Looking inside that directory, it appears that there is now a nested FiraCode
directory:
❯ tree ~/.nix-profile/share/fonts/truetype/NerdFonts
/home/jordan/.nix-profile/share/fonts/truetype/NerdFonts
└── FiraCode
├── FiraCodeNerdFont-Bold.ttf
├── FiraCodeNerdFont-Light.ttf
├── FiraCodeNerdFont-Medium.ttf
├── FiraCodeNerdFontMono-Bold.ttf
├── FiraCodeNerdFontMono-Light.ttf
├── FiraCodeNerdFontMono-Medium.ttf
├── FiraCodeNerdFontMono-Regular.ttf
├── FiraCodeNerdFontMono-Retina.ttf
├── FiraCodeNerdFontMono-SemiBold.ttf
├── FiraCodeNerdFontPropo-Bold.ttf
├── FiraCodeNerdFontPropo-Light.ttf
├── FiraCodeNerdFontPropo-Medium.ttf
├── FiraCodeNerdFontPropo-Regular.ttf
├── FiraCodeNerdFontPropo-Retina.ttf
├── FiraCodeNerdFontPropo-SemiBold.ttf
├── FiraCodeNerdFont-Regular.ttf
├── FiraCodeNerdFont-Retina.ttf
└── FiraCodeNerdFont-SemiBold.ttf
Any suggestions on why kitty can’t find the font now?
I have tried fc-cache -r
and fc-cache -f
with no success.