Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!


Fonts

Reference(s)

Table of contents


Install

$ sudo pacman -S fontconfig

The first reflex to have is to search the font you chose with your package manager, if it's not there then you can install it manually. E.g. some popular fonts on Arch Linux:

$ sudo pacman -S ttf-hack ttf-fira-code ttf-inconsolata ttf-jetbrains-mono ttf-ubuntu-font-family ttf-joypixels

Tip

Good Unicode coverage with inconsolata, symbola and joypixels (or noto-fonts-emoji).

Tip

For coding, I personally like Hack Nerd Font or FiraCode Nerd Font. See the Nerd Fonts section bellow.

How to manually install a font system wide

Download and copy .otf or .ttf file(s) in /usr/share/fonts, then run:

$ sudo fc-cache -f -v

How to manually install a font user wide

Download and copy .otf or .ttf file(s) in ~/.local/share/fonts, then run:

$ fc-cache -f -v

Better emojis support

If you want emojis support in your terminal and windows manager, install libxft-bgra (more details here). E.g. for st and dwm to render emojis.

In this case, do not hesitate to replace libxft:

:: libxft-bgra and libxft are in conflict. Remove libxft? [y/N] y

Nerd Fonts

Nerd Fonts is a project that patches developer targeted fonts with a high number of glyphs (icons). Specifically to add a high number of extra glyphs from popular 'iconic fonts' such as Font Awesome, Devicons, Octicons, and others.

You can either install the Nerd Fonts you want manually (from this link: https://www.nerdfonts.com/font-downloads) like describe in the above sections.

Or you can install the Nerd Fonts you want with the Nerd Fonts installer:

$ mkdir -p $HOME/apps/src-apps
$ cd $HOME/apps/src-apps
$ git clone https://github.com/ryanoasis/nerd-fonts.git # cloning nerd-fonts can take some time
$ cd nerd-fonts
$ chmod +x install.sh

$ ./install.sh --help
$ ./install.sh "Hack Nerd Font" # e.g. for "Hack" local install (in `$HOME/.local/share/fonts`)
$ sudo ./install.sh -S "Hack Nerd Font" # e.g. for "Hack" system install (in `/usr/local/share/fonts`)


Config

The different options of a font (e.g. size) can be configured depending on your windows manager and your terminal application. E.g. for dwm and st Suckless tools: fonts are configurable in their respective config.h file.


Use

  • List available fonts:

    $ fc-list
    

  • List installed fonts and available font options (with an X11 point and click application):

    $ xfontsel
    

Troubleshooting

Noto color emoji bug

See https://bugzilla.redhat.com/show_bug.cgi?id=1498269


If this cheat sheet has been useful to you, then please consider leaving a star here.