OpenType fonts my be used in different situations, which is why the file
format allows for different things to happen in different scripts and
languages.
-
The script has to do with the letterforms.
This text is written in the Latin script, which is called a simple script
because it is comparatively easy to render,
just like the Greek and the Cyrillic scripts.
Complex scripts are used for example for Arabic and Indic languages.
-
The language a text is written is important as well.
This may not seem clear at once, but a good example of a language that
requires different mark positioning than other languages
with the same script is Vietnamese:
normal Latin marks are supposed to be put over the previous one,
but in Vietnamese some marks should be placed right of the previous mark.
Also, the Serbian alphabet has some different glyph forms from the
Russian alphabet, although both are called Cyrillic.
Normally, scripts would also define a default language that is used
when no specific instruction for a certain language are available.
For example, English, French and Dutch all may use the same rules for glyph
substitution and positioning.
Internals
Features
In order to let the client (the computer program that shows a text on the
screen, for example your favourite word processor) know what a rule does
on an abstract level, features are used.
As a lot of processing within OpenType fonts is done with 4-character codes
that are called tags, features have been assigned tags that tell
the client what they do.
-
The liga tag is short for ligatures.
The font may implement these tags by replacing the sequences like
"fi" by ligatures.
-
The mark tag is short for mark positioning.
This feature contains information about the positions of marks
relative to their base characters.
A full list of feature tags and their descriptions is available from the
Microsoft website.
Many features are not turned on by default; some may be switched on by the
user, and others may be switched on at the discretion of the client.
Lookups
What actually happens when a feature is switched on is implemented by
lookups.
As the name suggests, when these things are applied the right context is
found and the substitution or positioning is applied.
There are two kinds of lookups.
-
Substitution lookups substitute one glyph for another.
This may provide an esthetic alternate for a glyph or a number of glyphs,
or characters may be composed or decomposed for technical reasons.
-
Positioning lookups position glyphs.
This may be done using relative positioning of the glyph and by changing
the advance width or height of the glyph.
For example, the advance width of the glyph "V" may be changed in sequences
"VA":