8.5.1 Loading and Freeing Fonts

Xlib provides functions that you can use to load fonts, get font information, unload fonts, and free font information. A few font functions use a GContext resource ID or a font ID interchangeably.

To load a given font, use XLoadFont().

To return information about an available font, use XQueryFont().

To perform a XLoadFont() and XQueryFont() in a single operation, use XLoadQueryFont().

To unload the font and free the storage used by the font structure that was allocated by XQueryFont() or XLoadQueryFont(), use XFreeFont().

To return a given font property, use XGetFontProperty().

To unload a font that was loaded by XLoadFont(), use XUnloadFont().

Next: Obtaining and Freeing Font Names and Information

Christophe Tronche, ch@tronche.com