FontFeature.alternativeFractions constructor

const FontFeature.alternativeFractions()

Use alternative ligatures to represent fractions. (afrc)

When this feature is enabled (and the font supports it), sequences of digits separated by U+002F SOLIDUS character (/) or U+2044 FRACTION SLASH (⁄) are replaced by ligatures that represent the corresponding fraction. These ligatures may differ from those used by the FontFeature.fractions feature.

This feature overrides all other features.

{@tool sample} The Ubuntu Mono font supports the afrc feature. It causes digits before slashes to become superscripted and digits after slashes to become subscripted. This contrasts to the effect seen with FontFeature.fractions.

** See code in examples/api/lib/ui/text/font_feature.font_feature_alternative_fractions.0.dart ** {@end-tool}

See also:

Implementation

const FontFeature.alternativeFractions()
    : feature = 'afrc',
      value = 1;