FontFeature.historicalLigatures constructor
Use historical ligatures. (hlig
)
Some fonts support ligatures that have fallen out of favor today, but were historically in common use. This feature enables those ligatures.
For example, the "long s" glyph was historically typeset with characters such as "t" and "h" as a single ligature.
This does not enable the legacy forms, only ligatures. See FontFeature.historicalForms to enable single characters to be replaced with their historical alternatives. Combining both is usually desired since the ligatures typically apply specifically to characters that have historical forms as well. For example, the historical forms feature might replace the "s" character with the "long s" (ſ) character, while the historical ligatures feature might specifically apply to cases where "long s" is followed by other characters such as "t". In such cases, without the historical forms being enabled, the ligatures would only apply when the "long s" is used explicitly.
This feature may override other glyph-substitution features.
{@tool sample}
The Cardo font supports the hlig
feature. It has legacy
ligatures for "VI" and "NT", and various ligatures involving the
"long s". In the example below, both historical forms (hist 1
)
and historical ligatures (hlig 1
) are enabled, so, for
instance, "fish" becomes "fiſh" which is then rendered using a
ligature for the last two characters.
Similarly, the word "business" is turned into "buſineſſ" by
hist
, and the ſi
and ſſ
pairs are ligated by hlig
.
Observe in particular the position of the dot of the "i" in
"business" in the various combinations of these features.
** See code in examples/api/lib/ui/text/font_feature.font_feature_historical_ligatures.0.dart ** {@end-tool}
See also:
Implementation
const FontFeature.historicalLigatures()
: feature = 'hlig',
value = 1;