clig — Contextual Ligatures
clig (Contextual Ligatures) gathers ligatures recommended only in specific contexts.
The specification’s example is Bickham Script, a cursive typeface, which forms the f t ligature except when preceded by a letter with an ascender. Context-dependent ligature decisions matter for some script designs and for swash ligatures.
Example
Section titled “Example”.fea source
Choosing among the ligature features
Section titled “Choosing among the ligature features”Five features form ligatures, clig among them.
| Feature | Purpose |
|---|---|
rlig |
Ligatures required for correct display of a script. Always applied |
liga |
Ligatures in common use. On by default |
clig |
Ligatures recommended only in a specific context. On by default |
dlig |
Ligatures used for special effect, at the user’s preference. Off by default |
hlig |
Ligatures once in common use that now appear anachronistic. Off by default |
clig is on by default. Unlike the other ligature features, it specifies the context in which the ligature is recommended, and does not form the ligature where the context doesn’t match.
liga, also on by default, covers ligatures used in common, regardless of context. Ligatures that form or not depending on the surrounding glyphs belong in clig.
Writing it in a feature file
Section titled “Writing it in a feature file”The rules are written with Lookup Type 6. This example marks sequences with a preceding letter (@LETTER) as an exception with ignore sub, so the ligature forms only at the start of a word.