Fonts are implemented in the module
Font.htmlFont. The datatype Font represents
the specification of exactly one font in the usual (X-style) way,
by giving a family, slant, spacing, width and weight. For example, the
family is given by
where the five enumerated types are available on most systems. With Other, you can directly give a more exotic family such as clearlyu alternate glyphs.
Just like with colours, there is a class
instances of which give ways of describing fonts, such as the following:
The first three allows fonts to be specified by the font family, plus the size, plus the weight or the slant, respectively; the second from last allows an X-style string (e.g. -adobe-courier-bold-o-normal-*-14-*-*-*-*-*-iso8859-*-), and the last an X-style specification as an abstract datatype.
Be warned that fonts are, in principle, not very portable under X, since the available fonts are determined by the fonts of the X server the programm is running on. It is best to stick to well-known font families such as the above, and usual sizes. (So, no clearlyu alternate glyphs in 144 pixels.)