Type | Field | Description |
USHORT | version | Table version number (starts at 0) |
USHORT | nTables | Number of subtables in the kerning table. |
Type | Field | Description |
USHORT | version | Kern subtable version number |
USHORT | length | Length of the subtable, in bytes (including this header). |
USHORT | coverage | What type of information is contained in this table. |
Sub-field | Bits #'s | Size | Description |
horizontal | 0 | 1 | 1 if table has horizontal data, 0 if vertical. |
minimum | 1 | 1 | If this bit is set to 1, the table has minimum values. If set to 0, the table has kerning values. |
cross-stream | 2 | 1 | If set to 1, kerning is perpendicular to the flow of the text. If the text is normally written horizontally, kerning will be done in the up and down directions. If kerning values are positive, the text will be kerned upwards; if they are negative, the text will be kerned downwards. If the text is normally written vertically, kerning will be done in the left and right directions. If kerning values are positive, the text will be kerned to the right; if they are negative, the text will be kerned to the left. The value 0x8000 in the kerning data resets the cross-stream kerning back to 0. |
override | 3 | 1 | If this bit is set to 1 the value in this table should replace the value currently being accumulated. |
reserved1 | 4-7 | 4 | Reserved. This should be set to zero. |
format | 8-15 | 8 | Format of the subtable. Only formats 0 and 2 have been defined. Formats 1 and 3 through 255 are reserved for future use. |
Type | Field | Description |
USHORT | nPairs | This gives the number of kerning pairs in the table. |
USHORT | searchRange | The largest power of two less than or equal to the value of nPairs, multiplied by the size in bytes of an entry in the table. |
USHORT | entrySelector | This is calculated as log2 of the largest power of two less than or equal to the value of nPairs. This value indicates how many iterations of the search loop will have to be made. (For example, in a list of eight items, there would have to be three iterations of the loop). |
USHORT | rangeShift | The value of nPairs minus the largest power of two less than or equal to nPairs, and then multiplied by the size in bytes of an entry in the table. |
Type | Field | Description |
USHORT | left | The glyph index for the left-hand glyph in the kerning pair. |
USHORT | right | The glyph index for the right-hand glyph in the kerning pair. |
FWORD | value | The kerning value for the above pair, in FUnits. If this value is greater than zero, the characters will be moved apart. If this value is less than zero, the character will be moved closer together. |
Type | Field | Description |
USHORT | rowWidth | The width, in bytes, of a row in the table. |
USHORT | leftClassTable | Offset from beginning of this subtable to left-hand class table. |
USHORT | rightClassTable | Offset from beginning of this subtable to right-hand class table. |
USHORT | array | Offset from beginning of this subtable to the start of the kerning array. |
Type | Field | Description |
USHORT | firstGlyph | First glyph in class range. |
USHORT | nGlyphs | Number of glyph in class range. |