The style sheet and the font table are both in the table stream, located by the
FIB pairs
Stshf and SttbfFfn.
The style sheet (STSH)
cbStshithe size of the Stshi2Stshithe count of styles, the size of each style’s base, default fontscbStshiLPStdfor each style: a 16-bit size (0 for an unused slot), then a STDrepeats
istd.The first fields of Stshi are cstd, the number of styles, at offset 0, and
cbSTDBaseInFile, the size of the fixed part of each STD, at offset 2. An
istd of 0 is the Normal style, and the built-in Heading 1 to 9 styles are at
istd 1 to 9.
A style (STD)
| Offset | Size | Field | Meaning |
|---|---|---|---|
0 | 2 | sti, bits 0–11 | A built-in style number, or 4094 for a user’s own style |
2 | 2 | stk, bits 0–3; istdBase, bits 4–15 | The kind (1 paragraph, 2 character, 3 table, 4 list) and the style this one is based on |
4 | 2 | istdNext, bits 4–15 | The style of the paragraph that follows |
6 | 2 | bchUpe | The size of the whole STD |
8 | 2 | flags | Such as whether it shows in lists |
| cbSTDBaseInFile | varies | name | A 16-bit count, the characters in UTF-16LE, and a zero |
| after | varies | UPX | The properties of the style: grpprls of paragraph and character properties, each with a 16-bit size |
The file explorer lists the styles; style-based bold and italic on the styles themselves are not interpreted.
The font table (SttbfFfn)
cDatathe number of fonts2cbExtra02cbFfnthe size of each font record, one byte, then the FFNrepeats
An FFN is a flags byte (the font family), a 16-bit weight, a character set, a byte
ixchSzAlt, PANOSE (10 bytes), font signature (24 bytes), and then the font
name in UTF-16LE, ended by a zero and optionally followed by an alternate name.