10.  Font Functions  

(font? x)

Returns #t iff x is an object of type font.

(font-display)

Returns the display associated with the given font.

(open-font display font-name)

See XLoadQueryFont. font-name is a string or a symbol.

(close-font font)

See XUnloadFont.

(font-name font)

Returns the name of the specified font (a string) or #f if the name could not be determined (e.g. when the font has been obtained by a call to gcontext-font).

(gcontext-font gcontext)

Calls XQueryFont with the GC obtained by XGContextFromGC. Only a limited number of functions can be applied to a font returned by gcontext-font, since it has neither a name nor a font-ID.

(list-font-names display pattern)

See XListFonts. pattern is a string or a symbol. Returns a vector of font names (strings).

(list-fonts display pattern)

See XListFontsWithInfo. pattern is a string or a symbol. Returns a vector of fonts. These fonts are ``pseudo fonts'' which do not have a font-ID. A pseudo font is loaded automatically and turned into a ``real'' font the first time it is passed to a function that makes use of the font-ID.

(font-direction font)
(font-min-byte2 font)
(font-max-byte2 font)
(font-min-byte1 font)
(font-max-byte1 font)
(font-all-chars-exist? font)
(font-default-char font)
(font-ascent font)
(font-descent font)

These functions return the font direction as a symbol (left-to-right or right-to-left), the first and last character (as an integer), the first and last row (integer), an indication whether all characters have non-zero size (boolean), the default character (integer), and the ascent and descent (integer) of the specified font.

(char-rbearing font index)
(char-lbearing font index)
(char-width font index)
(char-ascent font index)
(char-descent font index)

These functions return the metrics of the character specified by the integer index of the given font. Each function returns an integer. font can be a 1-byte as well as a 2-byte font.

(max-char-lbearing font)
(max-char-rbearing font)
(max-char-width font)
(max-char-ascent font)
(max-char-descent font)

These functions return the maximum metrics over all characters in the specified font. Each function returns an integer.

(min-char-lbearing font)
(min-char-rbearing font)
(min-char-width font)
(min-char-ascent font)
(min-char-descent font)

These functions return the minimum metrics over all characters in the specified font. Each function returns an integer.

(font-properties font)

Returns a vector of font properties; each element of the vector is a pair consisting of the property name (an atom) and an unsigned integer (the value of the property).

(font-property font property-name)

Returns the value of the specified property associated with the specified font. property-name is a string or a symbol.

(font-path display)

See XGetFontPath. Returns the current font path as a vector of strings.

(set-font-path! display path)

See XSetFontPath. path is a list; each element is a string or a symbol.


Markup created by unroff 1.0,    September 24, 1996,    net@informatik.uni-bremen.de