1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv
to manually rebuild the font cache
I made a small, but useful to me, change to @donovan code. I added code to look up the latest version of nerd fonts and download those.
No need to introduce dependency on curl
and jq
. With proper download_url wget
will be automatically redirected to the latest version
download_url="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${zip_file}"
Since I just loaded Ubuntu on a new computer, had trouble and found this page, I'll add that the instructions at the top are great except unzipping didn't put them in a folder for me, so neovim/lazyvim didn't seem to load them properly. To get it to load, I had to put it into a folder inside the font folder. For example, after downloading FiraCode Nerd Font I went to my Downloads folder and ran...
mkdir -p ~/.local/share/fonts # create folder to load fonts into
mkdir FiraCode # matches the name of the zip file
mv ./FiraCode.zip ./FiraCode # move the zip into the new folder
cd FiraCode # change directory into the folder
unzip FiraCode.zip # unzip into the folder
rm FiraCode.zip # delete the zip file, we don't need it anymore
cd .. # change directory back up to Downloads
mv ./FiraCode ~/.local/share/fonts # move our new font folder into the font folder we created at the beginning
fc-cache -fv # reload the font-cache
Very manual, but I don't think I should need to update these very often!
Thank you so much!