The |FONT internal file lists the fonts a help file uses. The
font-change command in the text picks a
descriptor from it by number.
Header
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | u16 | NumFacenames | How many face names |
| 2 | 2 | u16 | NumDescriptors | How many font descriptors |
| 4 | 2 | u16 | FacenamesOffset | Where the face names are, from the start of the file. Also tells the layout: see below |
| 6 | 2 | u16 | DescriptorsOffset | Where the descriptors are |
| 8 | 2 | u16 | NumStyles | If FacenamesOffset is 12 or more: how many styles |
| 10 | 2 | u16 | StyleOffset | The same: where the styles are |
| 12 | 2 | u16 | NumCharmaps | If FacenamesOffset is 16 or more: how many character map names |
| 14 | 2 | u16 | CharmapOffset | The same: where they are |
Face names are fixed-width, NUL-padded strings; their width is the room between the two offsets divided by the number of names (usually 20 or 32 bytes).
Descriptors
Files made for Windows 3.0 and 3.1 use 11-byte descriptors, with sizes in half-points.
When FacenamesOffset is 12 or more the descriptors are 42 bytes, with sizes in
twips.
| Offset | Size | Type | Field (11-byte descriptor) |
|---|---|---|---|
| 0 | 1 | u8 | Attributes: bits 1 bold, 2 italic, 4 underline, 8 strikeout, 16 double underline, 32 small caps |
| 1 | 1 | u8 | Size in half-points |
| 2 | 1 | u8 | Family: 1 modern, 2 roman, 3 swiss, 4 script, 5 decorative |
| 3 | 2 | u16 | Face name number |
| 5 | 3 | bytes | Text colour (RGB) |
| 8 | 3 | bytes | Background colour (RGB) |
Of the 42-byte form, HELPDECO’s notes identify the face number (at offset 1), the
colours (at 3 and 6), the height (at 14, in twips), the weight (at 30), the italic,
underline, strikeout, double-underline and small-caps flags (at 34 to 38) and the pitch
and family byte (at 41). The other bytes are not understood. Multimedia Viewer files use a
different arrangement of the same size when FacenamesOffset is 16 or more, with
the face number at offset 0, a style number at offset 2 and the colours at 6 and 9.