OpenType Layout Features - Basics

Previous  Next

A script consist of several "blocks" containing declarations for scripts, features, lookups and groups. A block is started by the keyword and optional name and/or tag following a left curly bracket "{" a block is closed by a right curly bracket "}".

It is not possible to nest these blocks, with the exception of the language block which has to be nested into a script block. Names of blocks must be unique across the script and they are case sensitive. It is possible to reference a block before it is declared. A compiler error will be generated when a feature is referenced that does not exist, and when a feature is declared but not referenced.

Basic layout of a script:

script <tag> {

 <feature references>



feature <name> <tag> {

 <lookup references>



lookup <name> {

 [featureflags <flags>]

 <substitution declarations>