FontFeature.proportionalFigures constructor

const FontFeature.proportionalFigures()

Use proportional (varying width) figures. (pnum)

For fonts that have both proportional and tabular (monospace) figures, this enables the proportional figures.

This is mutually exclusive with FontFeature.tabularFigures.

The default behavior varies from font to font.

{@tool sample} The Kufam font supports the pnum feature. It causes the digits to become proportionally-sized, rather than all being the same width. In this font this is especially noticeable with the digit "1": normally, the 1 has very noticeable serifs in this sans-serif font, but with the proportionally figures enabled, the digit becomes much narrower.

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

See also:

Implementation

const FontFeature.proportionalFigures()
    : feature = 'pnum',
      value = 1;