OptionalbackgroundColor painted behind the run's glyphs.
OptionalcolorFill color for the glyphs. Defaults to black.
OptionaldecorationWhich lines to draw. Combine with |: Underline | LineThrough.
OptionaldecorationColor of the decoration lines. Defaults to the text color.
OptionaldecorationHow those lines are drawn. Anything outside the set draws as Solid.
OptionaldecorationLine thickness as a multiple of the font's own decoration thickness.
OptionalfontFamilies to match, in preference order, as ctx.font lists them.
OptionalfontOpenType features applied to the run: small caps (smcp/c2sc),
ligatures (liga/dlig), oldstyle/tabular/proportional figures
(onum/lnum/tnum/pnum), slashed zero (zero), stylistic
sets (ss01...ss20), and so on. The Canvas2D fontVariant path
exposes these too; this is the rich-text/paragraph equivalent.
OptionalfontType size in pixels.
OptionalfontFace selection within the families: CSS numeric weight (400 normal,
700 bold), CSS numeric width (1 ultra-condensed through 9
ultra-expanded), and slant as 0 upright, 1 italic, 2 oblique.
Each defaults to normal when left out.
Optionalslant?: numberSlant in degrees, for a font with a variable slant axis.
Optionalweight?: numberWeight on the CSS scale, 100 to 900.
Optionalwidth?: numberWidth as a percentage of normal, where 100 is unstretched.
OptionalfontExplicit variable-font axis positions. When set, the paragraph engine instantiates the matched typeface at these axis values instead of relying on the nominal weight match -- match CanvasKit's behaviour where the variable axes are honoured precisely.
Each entry must carry a 4-character ASCII axis tag; values are
clamped to the typeface's declared min/max for that axis. Entries
referring to axes the typeface doesn't expose are silently dropped.
OptionalforegroundFill color for the glyphs, taking precedence over color where both are
given. The two are separate in CanvasKit and kept separate here.
OptionalhalfDistribute the run's leading half above and half below the text,
centring it within the line box. Mirrors CanvasKit's
TextStyle.halfLeading.
OptionalheightLine height as a multiple of fontSize, replacing the font's own
metrics. Setting it at all turns on the override.
OptionalletterExtra space added after each glyph, in pixels.
OptionalshadowsShadows painted under the run, in the order given -- several are
allowed, unlike the context's single shadowColor.
OptionalwordExtra space added at each word boundary, in pixels.
🧪 Not in the HTML Canvas standard.