Chapter 14. Installing and Configuring Fonts for the Graphical User Interface

Contents

14.1. Adding Fonts

The installation of additional fonts in openSUSE® is very easy. Simply copy the fonts to any directory located in the X11 font path . To the enable use of the fonts, the installation directory should be a subdirectory of the directories configured in /etc/fonts/fonts.conf or included into this file with /etc/fonts/suse-font-dirs.conf.

The following is an excerpt from /etc/fonts/fonts.conf. This file is the standard configuration file that should be appropriate for most configurations. It also defines the included directory /etc/fonts/conf.d. In this directory, all files or symbolic links starting with a two digit number are loaded by fontconfig. For a more detailed explanation of this functionality, have a look at /etc/fonts/conf.d/README.

<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/X11R6/lib/X11/fonts</dir> 
<dir>/opt/kde3/share/fonts</dir>
<dir>/usr/local/share/fonts</dir>
<dir>~/.fonts</dir>

/etc/fonts/suse-font-dirs.conf is automatically generated to pull in fonts that ship with (mostly third party) applications like OpenOffice.org, Java or Adobe Acrobat Reader. A typical entry would look like the following:

<dir>/usr/lib/Adobe/Reader9/Resource/Font</dir>
<dir>/usr/lib/Adobe/Reader9/Resource/Font/PFM</dir>
 

14.1. Adding Fonts

To install additional fonts systemwide, manually copy the font files to a suitable directory (as root), such as /usr/share/fonts/truetype. Alternatively, the task can be performed with the KDE font installer in the KDE Personal Settings. The result is the same.

Instead of copying the actual fonts, you can also create symbolic links. For example, you may want to do this if you have licensed fonts on a mounted Windows partition and want to use them. Subsequently, run SuSEconfig --module fonts.

SuSEconfig --module fonts executes the script /usr/sbin/fonts-config, which handles the font configuration. For more information on this script, refer to its manual page (man fonts-config).

The procedure is the same for bitmap fonts, TrueType and OpenType fonts, and Type 1 (PostScript) fonts. All these font types can be installed into any directory known to fonts-config.