Skip to main content

StrutStyle

TBD

Properties

  • font_family - See flet.Text.font_family.
  • force_strut_height - Whether the strut height should be forced.
  • height - The minimum height of the strut, as a multiple of size.
  • italic - Whether to use italic typeface.
  • leading - The amount of additional space to place between lines when rendering text.
  • size - The size of text (in logical pixels) to use when getting metrics from the font.
  • weight - The typeface thickness to use when calculating the strut.

Methods

  • copy - Returns a copy of this object with the specified properties overridden.

Properties

font_familyclass-attributeinstance-attribute

font_family: Optional[str] = None

See flet.Text.font_family.

force_strut_heightclass-attributeinstance-attribute

force_strut_height: Optional[bool] = None

Whether the strut height should be forced.

Defaults to False.

heightclass-attributeinstance-attribute

height: Optional[Number] = None

The minimum height of the strut, as a multiple of size.

See detailed explanation here: https://api.flutter.dev/flutter/painting/StrutStyle/height.html

italicclass-attributeinstance-attribute

italic: bool = False

Whether to use italic typeface.

leadingclass-attributeinstance-attribute

leading: Optional[Number] = None

The amount of additional space to place between lines when rendering text.

Defaults to using the font-specified leading value.

sizeclass-attributeinstance-attribute

size: Optional[Number] = None

The size of text (in logical pixels) to use when getting metrics from the font.

Defaults to 14.

weightclass-attributeinstance-attribute

weight: Optional[FontWeight] = None

The typeface thickness to use when calculating the strut.

Defaults to flet.FontWeight.W_400.

Methods

copy

copy(size: Optional[Number] = None, height: Optional[Number] = None, weight: Optional[FontWeight] = None, italic: Optional[bool] = None, font_family: Optional[str] = None, leading: Optional[Number] = None, force_strut_height: Optional[bool] = None)

Returns a copy of this object with the specified properties overridden.