Scaffolds for the Apple AAT tables (RM06). The modules decode the
envelopes (header, version, count, offsets) and, where the format
allows it, the AAT lookup tables themselves. lookup.js reads the
lookup tables and extended state tables; morx.js decodes the bodies of
its five subtable types with them, and morx-engine.js applies them;
kerx.js decodes every kerx format, prop.js its lookup and ankr.js
its anchors with them, and kerx-engine.js applies kerx (and the
classic kern).
The stub-ness signal is not uniform across the six modules — verify against the live code rather than assuming a shared contract:
prop.js,kerx.jsandmorx.jsreturnparsed: falseand anerrorfor a body that does not decode,parsed: trueotherwise.ankr.jsresolves a glyph's anchors through its lookup (anchors(glyph)).lcar.jsgives no runtime signal at all —parseLcarreturns an AAT lookup-tablelookupFormat+ rawlookupBytes, but does not decode the AAT lookup formats (0/2/4/6/8/10) needed to resolve a glyph ID to its caret block offset. There is no marker orparsedfield to detect this — a consumer must not callreadCaretBlockwith an offset derived from the lookup table, since the table is not decoded.feat.jshas no stub signal because it has no state-machine body to defer —parseFeatfully decodes every feature/setting record.
| Module | Returns | Deps | Description |
|---|---|---|---|
| morx | { parseMorx } |
fontErrors, fontReader, aatLookup |
Extended metamorphosis. |
| lookup | { parseLookup, parseStateTable, DELETED_GLYPH } |
fontErrors |
Lookup and extended state tables. |
| morx-engine | { applyMorx, chainFlags } |
— | Applies a parsed morx. |
| kerx | { parseKerx } |
fontErrors, fontReader, aatLookup |
Extended kerning. |
| kerx-engine | { applyKerx, applyKern } |
— | Applies a parsed kerx or kern. |
| ankr | { parseAnkr, readAnchorBlock } |
fontErrors, fontReader, aatLookup |
Anchor points. |
| prop | { parseProp, PROP_BITS } |
fontErrors, fontReader, aatLookup |
Glyph properties. |
| lcar | { parseLcar, readCaretBlock } |
fontErrors, fontReader |
Ligature carets. |
| feat | { parseFeat, FEAT_FLAGS } |
fontErrors, fontReader |
Feature names. |
| index | { aatFactories } |
the 6 modules above | Barrel (module aatBarrel, not aatIndex). |