Type

TextRun

A stretch of a title's words with a look of its own: some words in another colour, one in bold. start and end count characters - Unicode scalar values, what str::chars yields - into the title's content, not bytes, so a caller in any language counts them the way it counts a string; end is one past the last. Kept sorted, apart and non-empty; see TextStyle::style_range and TextStyle::edit_content.

Fields

  • endintegerrequired

    One past the last.

  • startintegerrequired

    The first character the look covers.

  • colorstringoptional

    Fill colour as #rrggbb, over the title's color.

  • fontScalenumberoptional

    Size as a multiple of the title's fontSize, 0.1..=10: 1.5 is half as big again. Relative, not a size of its own, so a word made bigger stays bigger by as much when the whole title is resized.

  • fontWeightnumberoptional

    CSS-scale weight, 100..=900, over the title's fontWeight; bold is 700, regular 400.

  • italicbooloptional

    Italic or upright, over the title's italic.

  • strikethroughbooloptional

    Struck through or not, over the title's strikethrough.

  • strokeColorstringoptional

    Outline colour, over the title's strokeColor; shows where the title has an outline at all.

  • underlinebooloptional

    Underlined or not, over the title's underline.