XLoadQueryFont

Syntax

XFontStruct *XLoadQueryFont(display, name)
      Display *display;
      char *name;

Arguments

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

Description

The XLoadQueryFont() function provides the most common way for accessing a font. XLoadQueryFont() both opens (loads) the specified font and returns a pointer to the appropriate XFontStruct structure. If the font name is not in the Host Portable Character Encoding, the result is implementation dependent. If the font does not exist, XLoadQueryFont() returns NULL.

XLoadQueryFont() can generate a BadAlloc error.

Diagnostics

BadAlloc The server failed to allocate the requested source or server memory.

See also

XCreateGC(), XFreeFont(), XGetFontProperty(), XListFonts(), XLoadFont(), XQueryFont(), XSetFontPath(), XUnloadFont(), "Loading and Freeing Fonts".
Christophe Tronche, ch@tronche.com