主题
StrutStyle
定义用于垂直文本布局的 strut(支撑线)。
strut 会相对于基线设置最小行高,并作用于段落中的每一行。当文本的书写系统或字体度量可能不同、但仍需保持可预测的纵向节奏时,它非常有用。
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
size | Optional[Number] | None | The size of text (in logical pixels) to use when getting metrics from the font. Defaults to 14. |
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 |
weight | Optional[FontWeight] | None | The typeface thickness to use when calculating the strut. Defaults to W_400. |
italic | bool | False | Whether to use italic typeface. |
font_family | Optional[str] | None | See font_family. |
leading | Optional[Number] | None | The amount of additional space to place between lines when rendering text. Defaults to using the font-specified leading value. |
force_strut_height | Optional[bool] | None | Whether the strut height should be forced. Defaults to False. |
方法
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
copy | 'StrutStyle' | — | 返回此对象的副本,可覆盖指定属性。 |