HPlogo Using the X Window System > Chapter 6 Using Fonts

Customizing the Font Search Path with `xset'

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Glossary

 » Index

The X server must know where to find the fonts you want to use. The font path is a list of font sources accessible to the X Window System. A font source can be either a directory containing bitmapped fonts, or a font server accepting connections at some TCP address.

The xset command allows you to tell the X server which font sources to use. You specify directories containing bitmapped fonts by the complete path name. You specify font servers by the string "tcp/<hostname>:portnumber."

To examine the font path, type:

   xset q Return

To add or remove sources from the path:

xset options

where the options are:

-fp source[,source...] fp- source[,source...]

Remove the directories from the head (-fp) or tail (fp-) of the font path.

+fp source[,source...] fp+ source[,source...]

Adds the sources to the head (+fp) or tail (fp+) of the font path.

fp= source[,source...]

Specifies the complete font path. The "=" is optional.

fp default

Resets the default font path.

fp rehash

Causes the server to reread the font databases for all directories (but not font servers) in the font path. This should be done after making any changes to directories that are in the font path, especially if you run mkfontdir, or if you change fonts.alias in any of these directories.

Here are some examples that show you various ways to use xset.

   xset fp tcp/:7000

Tells the X server to get all fonts from a font server running at TCP address 7000 on the local host.

   xset fp+ tcp/fontmaster:7000

Tells the X server to add a font server running on host fontmaster at TCP address 7000, to the end of the font path.

   xset +fp /usr/lib/X11/fonts/misc

Tells the X server to add the directory /usr/lib/X11/fonts/misc, which contains bitmapped fonts, to the beginning of the font path.

More information about xset is presented in chapter 8.

© 1995 Hewlett-Packard Development Company, L.P.