Function zng_wgt_text::line_height

source ยท
pub fn line_height(
    child: impl UiNode,
    height: impl IntoVar<LineHeight>,
) -> impl UiNode
Expand description

P Height of each text line. If not set inherits the line_height from the parent widget.

The Default value is computed from the font metrics, ascent - descent + line_gap, this is usually similar to 1.2.em(). Relative values are computed from the default value, so 200.pct() is double the default line height.

The text is vertically centered inside the height.

Sets the LINE_HEIGHT_VAR.