OpenType Layout Features - Basics

<< Click to Display Table of Contents >>

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

OpenType Layout Features - Basics

A script consist of several "blocks" containing declarations for scripts, features, lookups and classes. 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>