An XftFont is the primary data structure of interest to programmers using
Xft; it contains general font metrics and pointers to the Fontconfig character
set and pattern associated with the font. The FcCharSet and FcPattern data
types are defined by the Fontconfig library.

XftFonts

are populated with
any of XftFontOpen(), XftFontOpenName(), XftFontOpenXlfd(), XftFontOpenInfo(),
or XftFontOpenPattern(). XftFontCopy() is used to duplicate XftFonts, and
XftFontClose() is used to mark an XftFont as unused. XftFonts are internally
allocated, reference-counted, and freed by Xft; the programmer does not
ordinarily need to allocate or free storage for them.

XftDrawGlyphs(),

the XftDrawString*() family, XftDrawCharSpec(), and XftDrawGlyphSpec()
use XftFonts to render text to an XftDraw object, which may correspond
to either a core X drawable or an X Rendering Extension drawable.

XftGlyphExtents()

and the XftTextExtents*() family are used to determine the extents (maximum
dimensions) of an XftFont.

An

XftFont's glyph or character coverage can
be determined with XftFontCheckGlyph() or XftCharExists(). XftCharIndex()
returns the XftFont-specific character index corresponding to a given Unicode
codepoint.

XftGlyphRender(),

XftGlyphSpecRender(), XftCharSpecRender(),
and the XftTextRender*() family use XftFonts to draw into X Rendering Extension
Picture structures. Note:XftDrawGlyphs(), the XftDrawString*() family,
XftDrawCharSpec(), and XftDrawGlyphSpec() provide a means of rendering
fonts that is independent of the availability of the X Rendering Extension
on the X server.

XftFontInfo

is an opaque object that stores information
about a font. XftFontInfo structures are created with XftFontInfoCreate(),
freed with XftFontInfoDestroy(), and compared with XftFontInfoEqual(). XftFontInfo
objects are internally allocated and freed by Xft; the programmer does
not ordinarily need to allocate or free storage for them.

Each

XftFontInfo
structure in use is associated with a unique identifier, which can be retrieved
with XftFontInfoHash(). An XftFont can be opened based on XftFontInfo data
with XftFontOpenInfo().

An XftColor object permits text and other items to be rendered in a particular
color (or the closest approximation offered by the X visual in use). The
XRenderColor data type is defined by the X Render Extension library.

XftColorAllocName()

and XftColorAllocValue() request a color allocation from the X server (if
necessary) and initialize the members of XftColor. XftColorFree() instructs
the X server to free the color currently allocated for an XftColor.

One
an

XftColor has been initialized, XftDrawSrcPicture(), XftDrawGlyphs(),
the XftDrawString*() family, XftDrawCharSpec(), XftDrawCharFontSpec(),
XftDrawGlyphSpec(), XftDrawGlyphFontSpec(), and XftDrawRect() may be used
to draw various objects using it.

XftDraw

is an opaque object which holds
information used to render to an X drawable using either the core protocol
or the X Rendering extension.

XftDraw

objects are created with any of XftDrawCreate()
(which associates an XftDraw with an existing X drawable), XftDrawCreateBitmap(),
or XftDrawCreateAlpha(), and destroyed with XftDrawDestroy(). The X drawable
associated with an XftDraw can be changed with XftDrawChange(). XftDraws
are internally allocated and freed by Xft; the programmer does not ordinarily
need to allocate or free storage for them.

The X

Display, Drawable, Colormap,
and Visual of an XftDraw can be queried with XftDrawDisplay(), XftDrawDrawable(),
XftDrawColormap(), and XftDrawVisual(), respectively. The X Rendering Extension
Picture associated with an XftDraw is returned by XftDrawPicture().

XftFontOpen takes a list of pattern element triples of the form field,
type, value (terminated with a NULL), matches that pattern against the
available fonts, and opens the matching font, sizing it correctly for screen
number screen on display dpy. The Display data type is defined by the X11
library. Returns NULL if no match is found.

Also used internally by the XftFontOpen* functions, XftFontMatch can also
be used directly to determine the Fontconfig font pattern resulting from
an Xft font open request. The FcPattern and FcResult data types are defined
by the Fontconfig library.

XftTextExtents8 computes the pixel extents on display dpy of no more than
len glyphs of a string consisting of eight-bit characters when drawn with
font, storing them in extents. The FcChar8 data type is defined by the Fontconfig
library, and the XGlyphInfo data type is defined by the X Rendering Extension
library.

XftTextExtents16 computes the pixel extents on display dpy of no more than
len glyphs of a string consisting of sixteen-bit characters when drawn with
font, storing them in extents. The FcChar16 data type is defined by the
Fontconfig library, and the XGlyphInfo data type is defined by the X Rendering
Extension library.

XftTextExtents32 computes the pixel extents on display dpy of no more than
len glyphs of a string consisting of thirty-two-bit characters when drawn
with font, storing them in extents. The FcChar32 data type is defined by
the Fontconfig library, and the XGlyphInfo data type is defined by the
X Rendering Extension library.

XftTextExtentsUtf8 computes the pixel extents on display dpy of no more
than len bytes of a UTF-8 encoded string when drawn with font, storing them
in extents. The XGlyphInfo data type is defined by the X Rendering Extension
library.

XftTextExtentsUtf16 computes the pixel extents on display dpy of no more
than len bytes of a UTF-16LE- or UTF-16BE-encoded string when drawn with font,
storing them in extents. The endianness of string must be specified in endian.
The FcEndian data type is defined by the Fontconfig library, and the XGlyphInfo
data type is defined by the X Rendering Extension library.

Also used internally by the XftTextExtents* functions, XftGlyphExtents
computes the pixel extents on display dpy of no more than nglyphs in the
array glyphs drawn with font, storing them in extents. The FT_UInt data
type is defined by the FreeType library, and the XGlyphInfo data type is
defined by the X Rendering Extension library.

XftDrawCreate creates a structure that can be used to render text and rectangles
using the specified drawable, visual, and colormap on display. The Drawable,
Visual, and Colormap data types are defined by the X11 library.

XftDraw *XftDrawCreateBitmap (Display *dpy, Pixmap bitmap);

XftDrawCreateBitmap behaves as XftDrawCreate, except it uses an X pixmap
of color depth 1 instead of an X drawable. The Pixmap data type is defined
by the X11 library.

XftDraw *XftDrawCreateAlpha (Display *dpy, Pixmap pixmap, int depth);

XftDrawCreateAlpha behaves as XftDrawCreate, except it uses an X pixmap
of color depth depth instead of an X drawable. The Pixmap data type is defined
by the X11 library.

voidXftDrawChange (XftDraw *draw, Drawable drawable);

XftDrawChange changes the X drawable association of the existing Xft draw
object draw from its current value to drawable.

Display *XftDrawDisplay (XftDraw *draw);

XftDrawDisplay returns a pointer to the display associated with the Xft
draw object draw.