Skip to content

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.

Without clig
etc. et al.
With clig
etc. et al.
.fea source
Compiling…

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.

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.

Without rules
fish selfish
With rules
fish selfish
Compiling…