Font XLoadFont(display, name)
      Display *display;
      char *name;


display Specifies the connection to the X server.
name Specifies the name of the font, which is a null-terminated string.


The XLoadFont() function loads the specified font and returns its associated font ID. If the font name is not in the Host Portable Character Encoding, the result is implementation dependent. Use of uppercase or lowercase does not matter. When the characters ``?'' and ``*'' are used in a font name, a pattern match is performed and any matching font is used. In the pattern, the ``?'' character will match any single character, and the ``*'' character will match any number of characters. A structured format for font names is specified in the X Consortium standard X Logical Font Description Conventions. If XLoadFont() was unsuccessful at loading the specified font, a BadName error results. Fonts are not associated with a particular screen and can be stored as a component of any GC. When the font is no longer needed, call XUnloadFont().

XLoadFont() can generate BadAlloc and BadName errors.


BadAlloc The server failed to allocate the requested source or server memory.
BadName A font or color of the specified name does not exist.

See also

XCreateGC(), XFreeFont(), XGetFontProperty(), XListFonts(), XLoadQueryFont(), XQueryFont(), XSetFontPath(), XUnloadFont(), "Loading and Freeing Fonts".
Christophe Tronche, [email protected]