type defines the appearance of characters drawn with the
are usually read from files and are selected based on their
size, their style, the portion of Unicode space they represent,
and so on.
Fonts are built from a series of subfonts that define contiguous portions
of the Unicode character space, such as the ASCII or the
Font files are textual descriptions of the allocation of characters in
the various regions of the Unicode space; see
for the format.
Subfonts are not visible from Limbo.
A default font, named
is always available.
The type incorporates:
- ascent, height
- These define the vertical sizes
of the font, in pixels.
is the distance from the font baseline to the top of
a line of text;
gives the interline spacing, that is, the distance from
one baseline to the next.
- This field
identifies the font, either
the name of
the file from which the font was read, or
for the default font.
- Tells on which display the font resides.
- open(d, file)
method creates a
by reading the contents of the named
Fonts are cached, so an open request may return a pointer to an
without rereading the file.
always describes a defined font.
Fonts are created for an instance of a
object, even though the creation
functions are in type
- build(d, name, desc)
object by reading the description from the string
rather than a file.
specifies the name of the font to be created.
- f.width( str )
method returns the width in pixels that
would occupy if drawn by
in the Font