Nerd Fonts

Nerd Fonts provide support for icons in your text-based programs by stylizing or replacing some code points with more useful glyphs.

Examples

nvim-tree

nvim tree

dwmblocks

dwmblocks

zsh

zsh

Installation

If you want to try out all the font families, the Nerd Fonts Complete AUR Package is easy to install with yay.

$ yay -S nerd-fonts-complete

You could also find a more minimal install with just the font you want. For example, my laptop has a slow wifi card so I just installed this package.

$ yay -S ttf-nerd-fonts-hack-complete-gitfc-list | rg Hack

Alternatively, you can download the .ttf file and manually install it by copying/symlinking it into your ~/.local/share/fonts folder

$ ln -s hack-nerd-font.ttf ~/.local/share/fonts

Check out the Arch Wiki’s Fonts page for more information on how fonts actually get installed on your system.

Checking Install

Once you’ve got the fonts installed, you should be able to find them in your font listing.

$ fc-list | grep Nerd

/usr/local/share/fonts/Hack Bold Nerd Font Complete.ttf: Hack Nerd Font:style=Bold

If you installed Hack Nerd Font, you should notice that this web page switched to using it over the default monospace font. This means the following character displays as a document icon:

Application Usage

Add them to programs using the font’s name (or family). Many programs use Xft font strings. This format uses :s to separate family, size, style, weight, slant, and more configuration options.

dwm

static const char *fonts[]    = { "Hack Nerd Font:size=11" };

dmenu

static const char dmenufont[] = "Hack Nerd Font:size=11:style=Italic";