Fonts: Difference between revisions
Add section on patching nerd font into fonts |
|||
| Line 71: | Line 71: | ||
} | } | ||
</nowiki>}} | </nowiki>}} | ||
=== Patching nerdfonts into fonts === | |||
Not all fonts have Nerd Fonts variants, thankfully you can easily patch them in yourself. | |||
{{File|3=(pkgs.scientifica.overrideAttrs (o: { | |||
nativeBuildInputs = [ pkgs.nerd-font-patcher ]; | |||
postInstall = '' | |||
mkdir -p $out/share/fonts/truetype/{scientifica,scientifica-nerd} | |||
mv $out/share/fonts/truetype/*.ttf $out/share/fonts/truetype/scientifica/ | |||
for f in $out/share/fonts/truetype/scientifica/*.ttf; do | |||
nerd-font-patcher --complete --outputdir $out/share/fonts/truetype/scientifica-nerd/ $f | |||
done | |||
''; | |||
}))|name=fonts.nix|lang=nix}} | |||
=== Let Fontconfig know the fonts within your Nix profile === | === Let Fontconfig know the fonts within your Nix profile === | ||