NAME
XLoadFont − load a font if not already loaded; get font ID.
Synopsis
Font XLoadFont(display, name)
Display *display;
char *name;
Arguments
displaySpecifies a connection to an X server; returned from XOpenDisplay().
nameSpecifies the name of the font in a null terminated string. As of Release 4, the * and ? wildcards are allowed and may be supported by the server. Upper or lower case is not important. If the font name is not in the Host Portable Character Encoding, the result is implementation-dependent.
Description
XLoadFont() loads a font into the server if it has not already been loaded by another client. XLoadFont() returns the font ID or, if it was unsuccessful, When the font is no longer needed, the client should call XUnloadFont(). Fonts are not associated with a particular screen. Once the font ID is available, it can be set in the font member of any GC, and thereby used in subsequent drawing requests. Font information is usually necessary for locating the text. Call XLoadFont()WithInfo to get the info at the time you load the font, or call XQueryFont() if you used XLoadFont() to load the font. For more information on fonts, see Volume One, Chapter 6, Drawing Graphics and Text.
Errors
BadAllocServer has insufficient memory to store font. name specifies an unavailable font.
See Also
XCreateFontCursor(), XFreeFont(), XFreeFontInfo(), XFreeFontPath(), XGetFontPath(), XGetFontProperty(), XListFonts(), XListFontsWithInfo(), XLoadQueryFont(), XQueryFont(), XSetFont(), XSetFontPath(), XUnloadFont().
Copyright O’Reilly & Assoc. —