FontFeature constructor
Creates a FontFeature object, which can be added to a TextStyle to change how the engine selects glyphs when rendering text.
feature
is the four-character tag that identifies the feature.
These tags are specified by font formats such as OpenType.
value
is the value that the feature will be set to. The behavior
of the value depends on the specific feature. Many features are
flags whose value can be 1 (when enabled) or 0 (when disabled).
See docs.microsoft.com/en-us/typography/opentype/spec/featuretags
Implementation
const FontFeature(
this.feature,
[ this.value = 1 ]
) : assert(feature.length == 4, 'Feature tag must be exactly four characters long.'),
assert(value >= 0, 'Feature value must be zero or a positive integer.');