Skip to content

LAYT table proposal

Simon Cozens edited this page Mar 20, 2021 · 1 revision

This is a scratchpad for a proposed new model of OpenType layout suitable for the next major successor to OpenType.

Design principles

  • The font decides. Order of application of features, timing of syllabic reordering, etc. is driven by the logic within the font, not by the shaper.

Table structure

field type notes
version VERSION Set to 1.0
num_features USHORT Number of features
features FeatureTable[num_features]

FeatureTable

field type notes
featurename TAG Name of this feature
n_lookups USHORT Number of lookups in this feature
start OFFSET Offset from start of table to first lookup

Lookup

A lookup is a variable-length data structure which begins with the following common fields:

field type notes
length ULONG Length of the lookup, in bytes
opcode USHORT The opcode for this instruction. See Table of opcodes
flags USHORT Flags, as determined by the opcode

These three fields are followed by opcode-specific fields, as detailed below.

Table of opcodes

Basic layout operations

Substitute

Position

Attach

Chain

Vary

Glyphstream manipulation operations

Drop

Roll

Pick

Shaper behaviour