FontFeature.swash constructor

const FontFeature.swash([
  1. int value = 1
])

Enable swash glyphs. (swsh)

Some fonts have beautiful flourishes on some characters. These come in many forms, such as exaggerated serifs, long tails, long entry strokes, or other forms of decorative extensions to the base character.

This feature enables the rendering of these flourishes. Some fonts have many swashes per character; the argument, if specified, selects which swash to use (0 disables them altogether).

Some fonts have an absurd number of alternative swashes. For example, Adobe's Poetica famously has 63 different ampersand forms available through this feature!

{@tool sample} The BioRhyme Expanded font supports the swsh feature specifically for the capital "Q" and "R" glyphs and the ampersand.

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

See also:

Implementation

const FontFeature.swash([this.value = 1])
    : feature = 'swsh',
      assert(value >= 0);