acnt, the accent attachment table, is part of Apple’s TrueType. It
describes accented glyphs as a primary glyph with one or more accents, each placed by
putting a point of the accent on a point of the primary. Everything about such a glyph
except its outline is shared with, or worked out from, its parts. Apple says the table
is not supported on macOS or iOS and discourages its use. All numbers are
big-endian.
Rules
- An accented glyph has one primary component and one or more secondary ones.
- A component cannot itself be an accented glyph, and must be an outline in
glyf, not a bitmap. - Each accented glyph has its own glyph number. The numbers run without gaps and start above the highest ordinary glyph.
- There can be up to 32,768 primary components and 255 secondary ones.
- The only way to position a component is by matching attachment points. A secondary component has one attachment point.
A glyph with one accent takes 4 bytes; one with more takes 4 bytes and 2 for each accent. Each secondary glyph takes 3 bytes.
Header
| Type | Field | Meaning |
|---|---|---|
fixed32 | version | 0x00010000. |
uint16 | firstAccentGlyphIndex | First accented glyph. |
uint16 | lastAccentGlyphIndex | Last accented glyph. |
uint32 | descriptionOffset | Offset of the descriptions. |
uint32 | extensionOffset | Offset of the extension data. |
uint32 | secondaryOffset | Offset of the secondary data. |
The header is followed by one description for each accented glyph, the extension entries and the secondary data.
Descriptions
A description is 4 bytes. Its top bit gives the format; the next 15 bits are
primaryGlyphIndex.
Format 0: one accent
The other two bytes are primaryAttachmentPoint (uint8), a
point of the primary glyph, and secondaryInfoIndex (uint8),
an entry of the secondary data.
Format 1: several accents
The other two bytes are extensionOffset (uint16), counted
from the start of the extension data. Extension entries of 2 bytes follow one another
from there:
| Bits | Field | Meaning |
|---|---|---|
| 1 | components | 0: more entries follow; 1: this is the last. |
| 7 | secondaryInfoIndex | Entry of the secondary data. Seven bits reach entries 0 to 127. |
| 8 | primaryAttachmentPoint | Point of the primary glyph. |
Secondary data
An array of at most 255 entries of 3 bytes: secondaryGlyphIndex
(uint16), the accent’s glyph in glyf, and
secondaryGlyphAttachmentNumber (uint8), the point of the
accent that is put on the primary’s point.
In the viewer
The viewer shows the header, each description and the secondary data, and lists every accented glyph with its primary glyph, accents and points. Glyph numbers out of range, components that are accented glyphs and extension entries that do not end are listed as problems.
Sources
Apple, TrueType Reference
Manual, chapter acnt.
In its tables the 15-bit primaryGlyphIndex of format 0 is described as a
number of columns of data, and secondaryInfoIndex as a control point
number; the page follows the text of the chapter.