For most purposes, the technical differences between TrueType and OpenType can be ignored, some fonts with a ttf extension are actually OpenType fonts.

Other formats

The typesetting application, TeX, and its companion font software, Metafont, render characters using their own methods. Some of the file extensions used for fonts by these two programs are *pk, *gf, mf and vf.

Installation

Pacman

Fonts and font collections in the enabled repositories can be installed using pacman. Available fonts may be found by using:

$ pacman -Ss font

Or to search for ttf fonts only:

$ pacman -Ss ttf

Creating a package

You should give pacman the ability to manage your fonts, which is done by creating an Arch package. These can also be shared with the community in the AUR. Here is an example of how to create a basic package. To learn more about building packages, read PKGBUILD.

For a more convenient package creation from TTFs you can also use makefontpkgAUR from the AUR.

Manual installation

The recommended way of adding fonts that are not in the repositories to your system is described in #Creating a package. This gives pacman the ability to remove or update them at a later time. Fonts can alternately be installed manually as well.

To install fonts system-wide (available for all users), move the folder to the /usr/share/fonts/ directory. To install fonts for only a single user, use ~/.local/share/fonts (~/.fonts/ is now deprecated).

For Xserver to load fonts directly (as opposed to the use of a font server) the directory for your newly added font must be added with a FontPath entry. This entry is located in the Files section of your Xorg configuration file (e.g. /etc/X11/xorg.conf or /etc/xorg.conf). See #Older applications for more detail.

Then update the fontconfig font cache:

$ fc-cache -vf

Manual installation: advanced method

Manual installation and maintenance of your font resources may be especially useful if your collection is more specialized, e.g. if you use commercial fonts,
if you use fonts in different formats, if you often install and remove font files, or if you just feel you need more control and better access than offered by
the package manager. There are numerous benefits to such an approach:

You can avoid installation of multiple copies of the same family in different versions and formats (one of the most common reasons for rendering issues).

You can use multiple and non-standard physical sources of font files (e.g. an additional hard drive, a separate partition).

You can avoid relying on huge and cryptic local font sources which possibly contain 5 families you need and 55 you don't need (TeX Live & 09-texlive-fonts.conf, random font collections from the AUR, etc).

You can avoid rendering issues because your fontconfig settings were tuned to a different format but the one installed in your system.

You can quickly verify which families in which format(s) are present in the system and available for applications by visually inspecting the content of the main font directory (as a result, you don't need sophisticated and heavy-on-resources font management applications: gtk2fontsel and basic CLI tools like fc-query from fontconfig package will do the job even better and faster).

When you install or upgrade a single font, the same version will be available for all applications, including LaTeX related software.

If necessary, you can quickly enable / disable a particular family because you know where exactly it can be found (useful for debugging).

In the long run, you save time needed to resolve issues and eliminate conflicts caused by careless use of the package manager.

In practical terms, there are at least a few ways to achieve this, which, if necessary, can be adopted by any package manager. The one described below has
proven to be very efficient and secure even with large font collections.

We are going to separate font source locations (e.g. /usr/share/fonts.avail: this is where our fonts will be stored) from a directory containing symbolic links to the families in use (/usr/share/fonts).

Each family is going to be located in a separate, clearly named subdirectory. The naming convention should be consistent and unambiguous, for instance:

We are not going to touch TeX Live font directories to avoid issues with LaTeX software. Instead, since we can use multiple locations, we will create symlinks in /usr/share/fonts, giving applications access to particular families:

If you are seeing errors similar to this and/or seeing blocks instead of characters in your application then you need to add fonts and update the font cache. This example uses the ttf-liberation fonts to illustrate the solution and runs as root to enable them system-wide.

Console fonts

Note: This section is about the Linux console. For an alternative console solutions offering more features (full Unicode fonts, modern graphics adapters etc.), see fbterm, KMSCON or similar projects.

By default, the virtual console uses the kernel built-in font with a CP437 character set,[1] but this can be easily changed.

The Linux console uses UTF-8 encoding by default, but because the standard VGA-compatible framebuffer is used, a console font is limited to either a standard 256, or 512 glyphs. If the font has more than 256 glyphs, the number of colours is reduced from 16 to 8. In order to assign correct symbol to be displayed to the given Unicode value, a special translation map, often called unimap, is needed. Nowadays most of the console fonts have the unimap built-in, historically it had to be loaded separately.

The kbd package provides tools to change virtual console font and font mapping. Available fonts are saved in the /usr/share/kbd/consolefonts/ directory, those ending with .psfu or .psfu.gz have a Unicode translation map built-in.

Keymaps, the connection between the key pressed and the character used by the computer, are found in the subdirectories of /usr/share/kbd/keymaps/, see Keyboard configuration in console for details.

Note: Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.

Previewing and testing

The available glyphs or letters in the font can also be viewed as a table with using showconsolefont:

$ showconsolefont

The setfont utility may be used to temporarily change the font, so that the user can consider its permanent use. Just pass the name of the font (they are located in /usr/share/kbd/consolefonts/). For example:

$ setfont lat2-16

If the newly changed font is not suitable, a return to the default font with the following command (even if the console display is totally unreadable, this command will still work, just type the command "blindly"):

$ setfont

Note:setfont only works on the console currently being used. Any other consoles, active or inactive, remain unaffected.

Persistent configuration

The FONT variable in /etc/vconsole.conf is used to set the font at boot, persistently for all consoles. See man 5 vconsole.conf for details.

For displaying characters such as Č, ž, đ, š or Ł, ę, ą, ś using the font lat2-16.psfu.gz:

/etc/vconsole.conf

...
FONT=lat2-16

It means that second part of ISO/IEC 8859 characters are used with size 16. You can change font size using other values (e.g. lat2-08). For the regions determined by 8859 specification, look at the Wikipedia table.

To use the specified font in early userspace, use the consolefont hook in /etc/mkinitcpio.conf. See Mkinitcpio#HOOKS for more information.

If the fonts seems to not change on boot, or change only temporarily, it is most likely that they got reset when graphics driver was initialized and console was switched to framebuffer. To avoid this, load your graphics driver earlier. See for example Kernel Mode Setting#Early KMS start, [2] or other ways to setup your framebuffer before /etc/vconsole.conf is applied.

Font packages

This is a selective list that includes many font packages from the AUR along with those in the official repositories. Fonts are tagged "Unicode" if they have wide Unicode support, see the project or Wikipedia pages for detail.

Github user Ternstor has created a python script that generates HTML documents with PNG images of all the fonts in the AUR and the official repositories: [3].

ttf-persian-x2AUR - X Series 2 fonts are built on freely available fonts and extended to support Persian, Arabic, Urdu, Pashto, Dari, Uzbek, Kurdish, Uighur, old Turkish (Ottoman) and modern Turkish (Roman). (AUR)

ttf-iran-nastaliqAUR - An Unicode calligraphic font published by the High Council of Informatics of Iran (AUR)

ttf-mplusAUR - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace). (AUR)

Greek

Almost all Unicode fonts contain the Greek character set (polytonic included). Some additional font packages, which might not contain the complete Unicode set but utilize high quality Greek (and Latin, of course) typefaces are:

Fallback font order with X11

Fontconfig automatically chooses a font that matches the current requirement. That is to say, if one is looking at a window containing English and Chinese for example, it will switch to another font for the Chinese text if the default one does not support it.

Fontconfig lets every user configure the order they want via $XDG_CONFIG_HOME/fontconfig/fonts.conf.
If you want a particular Chinese font to be selected after your favorite Serif font, your file would look like this:

You can add a section for Sans-serif and monospace as well. For more informations, have a look at the fontconfig manual.

Font alias

There are several font aliases which represent other fonts in order that applications may use similar fonts. The most common aliases are: serif for a font of the serif type (e.g. DejaVu Serif); sans-serif for a font of the sans-serif type (e.g. DejaVu Sans); and monospace for a monospaced font (e.g. DejaVu Sans Mono). However, the fonts which these aliases represent may vary and the relationship is often not shown in font management tools, such as those found in KDE and other desktop environments.

To reverse an alias and find which font it is representing, run:

$ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

In this case, DejaVuSansMono.ttf is the font represented by the monospace alias.

Tips

List all installed fonts

You can use the following command to list all installed fonts that are available on your system.

$ fc-list

Application-specific font cache

Matplotlib (python-matplotlib or python2-matplotlib) uses its own font cache, so after updating fonts, be sure to remove $HOME/.matplotlib/fontList.cache,
$HOME/.cache/matplotlib/fontList.cache, $HOME/.sage/matplotlib-1.2.1/fontList.cache, etc. so it will regenerate its cache and find the new fonts [4].