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

Some fonts like terminus are installed in /usr/share/fonts/local, which is not added to the font path by default. By adding the following lines to ~/.xinitrc the fonts can be used in X11:

xset +fp /usr/share/fonts/local
xset fp rehash

Creating a package

If you want to give pacman the ability to manage your fonts, you can create 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.

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 ~/.fonts/ instead.

Also you may need to update /etc/X11/xorg.conf or /etc/xorg.conf with the new directory. Search for FontPath to find the correct location within the file to add your new path. See #Fonts with X.Org for more detail.

Then update the fontconfig font cache:

$ fc-cache -vf

Older applications

With older applications that do not support fontconfig (e.g. GTK+ 1.x applications, and xfontsel) the index will need to be created in the font directory:

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.

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 PNG images of all fonts in extra, community and the AUR so you can preview all the fonts below.

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)

Cyrillic

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:

Previewing and testing

Moreover, the user can use setfont to temporarily change the font and be able to consider its use as the default. The available glyphs, or letters in the font can also be viewed as a table with the command showconsolefont.

If the newly changed font is not suitable, a return to the default font is done by issuing the command setfont without any arguments. If the console display is totally unreadable, this command will still work—the user just types in setfont while "working blind."

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

Examples

Change the font. This example is distinctive:

$ setfont /usr/share/kbd/consolefonts/gr737b-9x16-medieval.psfu.gz

Or change the font to one with 512 glyphs and set the keymap to ISO 8859-5 using the -m option:

Then issue commands that send text to the display, perhaps view a manpage and try vi or nano, and view the table of glyphs with the command, showconsolefont.

Return to the default font with:

$ setfont

Changing the default font

To change the default font, the FONT= and FONT_MAP= settings in /etc/vconsole.conf (this file may need to be created) must be altered. Again, the fonts can be found in /usr/share/kbd/consolefonts/ directory and keymaps can be found in the subdirectories of /usr/share/kbd/keymaps/.

Examples

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

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 like lat2-08...16. For the regions determined by 8859 specification, look at the Wikipedia. You can use a Terminus font which is recommended if you work a lot in console without X server. ter-216b for example is latin-2 part, size 16, bold. ter-216n is the same but normal weight. Terminus fonts have sizes up to 32.

Now, set the proper keymap, for lat2-16 it will be:

FONT_MAP=8859-2

To use the specified font in early userspace, that is, early in the bootup process, add the consolefont hook to /etc/mkinitcpio.conf:

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 KMS#Early_KMS_start or other ways to setup your framebuffer before /etc/vconsole.conf gets applied.

Boot Error

If "Loading Console Font" fails at boot time, this is probably because you didn't choose a valid font during your Arch Linux install.

To get rid of this message, simply empty the CONSOLEFONT variable in /etc/rc.conf. It will fallback on default font at boot.

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 doesn't 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 monospaced as well. For more informations, have a look at the fontconfig manual.

Font alias

In Linux 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.