XQueryFont

Syntax

XFontStruct *XQueryFont(display, font_ID)
      Display *display;
      XID font_ID;

Arguments

display Specifies the connection to the X server.
font_ID Specifies the font ID or the GContext ID.

Description

The XQueryFont() function returns a pointer to the XFontStruct structure, which contains information associated with the font. You can query a font or the font stored in a GC. The font ID stored in the XFontStruct structure will be the GContext ID, and you need to be careful when using this ID in other functions (see XGContextFromGC()). If the font does not exist, XQueryFont() returns NULL. To free this data, use XFreeFontInfo().

See also

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