OpenType Layout Features - Subtable

<< Click to Display Table of Contents >>

Navigation:  Editing Fonts > Format > OpenType Layout Features > Script Editor > Script Syntax >

OpenType Layout Features - Subtable

Sometimes lookup tables are very large and it's better to break them up into several smaller tables: for this the keyword subtable can be used. Subtables are most commonly used in kerning tables that contain a lot of kerning pairs. We recommend a subtable for every 16,000 kerning pairs.

Declaring a subtable is only possible from within a normal lookup table:

lookup MyKerningLookup {

 subtable [name] {

   <lookup declarations>

 }

}

 

When declaring multiple subtables, the first subtable is not required to obey the subtable syntax, but any consecutive subtable is. This means that:

lookup MyKerningLookup {

 <lookup declarations>

 

 subtable [name] {

   <lookup declarations>

 }

}

 

is valid, but

lookup MyKerningLookup {

 subtable [name] {

   <lookup declarations>

 }

 <lookup declarations>

}

 

is not.

 

The subtable name is optional, but we recommend defining one for clarity.

Note: The first declared subtable will define the lookup type and all consecutive subtables will have to be of the same type.