Jump to Content

Andrew M McCall

Andrew M McCall - Web Developer In Traverse City, Michigan

Install Nerd Fonts on Arch Linux Manually

Many applications depend on Nerd Fonts to display correctly. Learn how to manually install nerd fonts on Arch Linux using curl and unzip.

Prerequisites to installing Nerd Fonts On Arch Linux

This tutorial assumes you have the following packages installed:

  1. Curl
  2. Unzip

Installing Nerd Fonts Manually On Arch Linux Instructions

Note: In this example I am using 0xProto Nerd Font but please use the correct font when following the directions below.

  1. cd ~/Downloads
  2. mkdir fonts
  3. Navigate to nerdfonts.com
  4. Click Downloads
  5. Find the font you want to install
  6. Right-click on the Download button and select copy link
  7. In the ~/Downloads/fonts folder fetch the zip file with: curl -LO https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/0xProto.zip
  8. sudo mkdir -p /usr/share/fonts/nerd-fonts/0xOProto
  9. sudo unzip 0XProto.zip -d /usr/share/fonts/nerd-fonts/0xOProto
  10. fc-cache -fv
  11. vim ~/.config/alacritty/alacritty.toml
  12. Update Alacritty Following This Template

Verify What Nerd Fonts You Have Installed

If you want to check to see if the font is installed or verify the name:

andrew@fedora:~$ fc-match "Iosevka Nerd Font Mono"
IosevkaNerdFontMono-Regular.ttf: "Iosevka Nerd Font Mono" "Regular"
andrew@fedora:~$ fc-match "Iosevka Nerd Font"
IosevkaNerdFont-Regular.ttf: "Iosevka Nerd Font" "Regular"
andrew@fedora:~$

This will help you confirm the name of your font when you go to use it in a config file.

Additionally, you can also 8utilize the fc-list command:

fc-list :family | grep -i "iosevka" | sort -u

This is especially helpful if you want to list all the fonts or just need to see if one exists.

fc-list lists all of the currently installed fonts. passing in :family lets the system know we only want to list the families and not all of the extra details. Next, we pipe the output of that command into grep to search for a specific font that we are interested in. Finally, we pipe the result of that into sort to sort the output. The -u flag says we want unique results only.

Alacritty TOML Example

[general]
import = [
    "~/.config/alacritty/themes/themes/tokyo_night.toml"
]

[font]
size = 14.0 # Set your desired size

[font.normal]
family = "BlexMono Nerd Font"
style = "Regular"

[font.bold]
family = "BlexMono Nerd Font"
style = "Bold"

[font.italic]
family = "BlexMono Nerd Font"
style = "Italic"

What Are Nerd fonts

Nerd fonts are special fonts that can be installed that support icons and ligatures. Many applications in the Linux ecosystem depend on Nerd Fonts to offer a more visually pleasing experience when displaying text. They can display icons and also support ligature for some fancy text output. Nerd Fonts are supported by all major operating system but do not come pre-installed most of the time.

Nerd Fonts can be used in lieu of popular icon libraries such as Font Awesome and a nice benefit is that in can be used to patch existing fonts. This allows us to embed new icons into an existing typographical fontface. Nerd Fonts have great community support and continue to recieve updates and improvements as the project matures. You can read all about Nerd Fonts at nerdfonts.com or at github.com

Change Log

Tags: