Go to main content

Oracle® Solaris 11.3 Desktop Administrator's Guide

Exit Print View

Updated: March 2018
 
 

fontconfig Library

The Oracle Solaris Desktop uses the fontconfig configuration and customization library. The fontconfig library can use all types of fonts, including PostScript Type 1 fonts and TrueType fonts.

Many applications in the Oracle Solaris Desktop, including those that are part of the GNOME Desktop Environment, use the fontconfig system for finding fonts. The fontconfig library provides a list of all the fonts available on the Oracle Solaris Desktop. To compile this list, fontconfig searches the directories listed in the /etc/fonts/fonts.conf file.

Installing fonts to be accessed by the fontconfig library is as simple as copying them to the $HOME/.fonts subdirectory. Fonts accessed through this library are addressed with simple names such as DejaVu Sans or Liberation Mono.

The fc-list command provides a list of all fonts known to this library. You can specify specific sizes or styles by using the patterns described in the fonts.conf(4) man page. For example, to start an xterm using the bold variant of the DejaVu Mono font at a 12–point size, you would type the following command:

$ xterm -fa "DejaVu Mono-12:style=Bold"

For more information about the fontconfig library, see https://www.freedesktop.org/wiki/Software/fontconfig/.

For information about adjusting font configuration, see Chapter 5, Configuring Fonts in International Language Environments Guide for Oracle Solaris 11.3.

Adding Fonts

This section describes how to add fonts for all users or for an individual user.

How to Add a Font for All Users

  1. Copy the font file to one of the directories in the /etc/fonts/fonts.conf file.

    Typically, fonts are stored in the /usr/share/fonts/ directory. The fontconfig library updates the list of fonts automatically.

  2. If the list of fonts is not updated, type the following command:
    # fc-cache directory-name

How to Add a Font for an Individual User

  1. Copy the font file to the $HOME/.fonts directory of the user.

    The fontconfig library updates the list of fonts automatically.

  2. If the list of fonts is not updated, type the following command:
    # fc-cache directory-name