Installing OpenType Fonts in Gentoo

by jakob

This post describes how you install an OpenType Font (OTF) on your Gentoo box. All commands should be run with sudo or as root

Create a new directory in /usr/share/fonts/, e.g. OTF and copy your fonts there.

# mkdir /usr/share/fonts/OTF
# cp new_font.otf /usr/share/fonts/OTF/

Change directory to the new font directory and run mkfontdir and mkfontscale.

# cd /usr/share/fonts/OTF
# mkfontdir
# mkfontscale

Confirm that the new fonts are listed in the two files fonts.dir and fonts.scale.

Make sure the font path is in your /etc/X11/xorg.conf. If not, include the path in the files section.

Section "Files"
    ...
    FontPath     "/usr/share/fonts/OTF/"
EndSection

Call fc-cache -fv to update the font cache.

# fc-cache -fv

Now you are ready to use your new fonts. Happy installing!