| DRAW-FONT(2) | System Calls Manual | DRAW-FONT(2) |
Font - character images for Unicode text
include "draw.m";
draw := load Draw Draw->PATH;
Font: adt
{
name: string;
height: int;
ascent: int;
display: ref Display;
open: fn(d: ref Display, file: string): ref Font;
build: fn(d: ref Display, name, desc: string): ref Font;
width: fn(f: self ref Font, str: string): int;
};
The Font type defines the appearance of characters drawn with the Image.text primitive (see draw-image (2)). Fonts 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 Greek alphabet. Font files are textual descriptions of the allocation of characters in the various regions of the Unicode space; see font (6) for the format. Subfonts are not visible from Limbo.
A default font, named *default*, is always available.
The type incorporates: