Prev: Pixmap object Up: Xt Top: Top

3.9. Font object

The Font object attributes are read-only. The Font ID (fid) is fairly useless. Everywhere a Font ID is required in the library, a Font object must be given.

Font objects (font_objects) have the following methods and variables:

TextExtents (string) -- Method on Font object
Returns (direction, font_ascent, font_descent, (lbearing, rbearing, width, ascent, descent, attributes)). This function corresponds with XTextExtents.
TextWidth (string) -- Method on Font object
Returns width. This function corresponds with XTextWidth.
all_chars_exist -- attribute of Font object
Field in XFontStruct structure.
ascent -- attribute of Font object
Field in XFontStruct structure.
default_char -- attribute of Font object
Field in XFontStruct structure.
descent -- attribute of Font object
Field in XFontStruct structure.
direction -- attribute of Font object
Field in XFontStruct structure.
fid -- attribute of Font object
Field in XFontStruct structure.
max_bounds -- attribute of Font object
Field in XFontStruct structure.
max_byte1 -- attribute of Font object
Field in XFontStruct structure.
max_char_or_byte2 -- attribute of Font object
Field in XFontStruct structure.
min_bounds -- attribute of Font object
Field in XFontStruct structure.
min_byte1 -- attribute of Font object
Field in XFontStruct structure.
min_char_or_byte2 -- attribute of Font object
Field in XFontStruct structure.
n_properties -- attribute of Font object
Field in XFontStruct structure.
per_char -- attribute of Font object
Field in XFontStruct structure.
properties -- attribute of Font object
Field in XFontStruct structure.