height property
The height of this text span, as a multiple of the font size.
When height is kTextHeightNone, the line height will be determined by
the font's metrics directly, which may differ from the fontSize. Otherwise
the line height of the span of text will be a multiple of fontSize,
and be exactly fontSize * height
logical pixels tall.
For most fonts, setting height to 1.0 is not the same as setting height
to kTextHeightNone because the fontSize sets the height of the EM-square,
which is different than the font provided metrics for line height. The
following diagram illustrates the difference between the font-metrics
defined line height and the line height produced with height: 1.0
(which forms the upper and lower edges of the EM-square):
Examples of the resulting line heights from different values of TextStyle.height
:
See StrutStyle and TextHeightBehavior for further control of line height at the paragraph level.
Implementation
final double? height;