Some applications still use the original X Window System font mechanisms. They allow less styling choices, have a more complex font naming scheme, and do not include anti-aliasing or LCD font smoothing. For more information about the X11 font naming scheme, see the X Logical Font Description specification. Some of the X11 font commands include:
xlsfonts – Provides a list of all fonts known to the system
xfontsel – Provides a simple font selection application for the fonts known to the system
You can specify specific styles and sizes by using fields in the X Logical Font Description (XLFD) name. 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 -fn '-misc-dejavu sans mono-bold-r-normal--12-120-72-72-m-*-iso10646-1'
To install fonts by using the legacy X11 font system, you must create metadata files with the mkfontdir or mkfontscale commands and add the directory to the X server font path with the xset command. The font path changes made with the xset command are reset to the default setting for every new session.
Because the /etc/X11/fontpath.d directories are included in the default fonts.conf files in the Oracle Solaris OS, fonts added in this way are automatically available to the applications by using the fontconfig library.
For more information about the legacy X11 font system and installing the bitmap and scalable fonts, see http://www.x.org/releases/X11R7.6/doc/xorg-docs/fonts/fonts.html.
When installing fonts, you first need to create a font directory that contains all the relevant font files as well as some index files. You then need to inform the X server of the existence of this new directory by including it in the font path.
Although bitmap fonts are normally distributed in the BDF format, the binary PCF format is more efficient.
For example, to convert a courier12.bdf file, you would type:
$ bdftopcf courier12.bdf
For example:
$ gzip courier12.pdf
For example, to use the /usr/local/share/fonts/bitmap/ directory:
$ mkdir /usr/local/share/fonts/bitmap/ $ cp *.pcf.gz /usr/local/share/fonts/bitmap/
$ mkfontdir /usr/local/share/fonts/bitmap/
Putting a plus sign (+) before the option adds the directory to the beginning of the font path. Putting it after the option adds the directory to the end of the font path.
For example:
$ xset +fp /usr/local/fonts/Type1 $ xset fp+ /usr/local/fonts/bitmap
For more information, see the xset man page.
The path is computed by appending all the directories mentioned in the FontPath entries of the Files section of the file in the order in which they appear
For example:
FontPath "/usr/local/fonts/Type1" ... FontPath "/usr/local/fonts/bitmap"
For more information see the xorg.conf man page.