Type Alias zng_ext_font::LineHeight

source ·
pub type LineHeight = Length;
Expand description

Text line height.

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.

Aliased Type§

enum LineHeight {
Show 15 variants Default, Dip(Dip), Px(Px), Pt(f32), Factor(Factor), Leftover(Factor), Em(Factor), RootEm(Factor), ViewportWidth(Factor), ViewportHeight(Factor), ViewportMin(Factor), ViewportMax(Factor), DipF32(f32), PxF32(f32), Expr(Box<LengthExpr>),
}

Variants§

§

Default

The default (initial) value.

§

Dip(Dip)

The exact length in device independent units.

§

Px(Px)

The exact length in device pixel units.

§

Pt(f32)

The exact length in font points.

§

Factor(Factor)

Relative to the fill length.

§

Leftover(Factor)

Relative to the leftover fill length.

§

Em(Factor)

Relative to the font-size of the widget.

§

RootEm(Factor)

Relative to the font-size of the root widget.

§

ViewportWidth(Factor)

Relative to the width of the nearest viewport ancestor.

§

ViewportHeight(Factor)

Relative to the height of the nearest viewport ancestor.

§

ViewportMin(Factor)

Relative to the smallest of the nearest viewport ancestor’s dimensions.

§

ViewportMax(Factor)

Relative to the smallest of the nearest viewport ancestor’s dimensions.

§

DipF32(f32)

The exact length in device independent units, defined using a f32 value.

This value will be rounded to the nearest pixel after layout, but it will be used as is in the evaluation of length expressions.

§

PxF32(f32)

The exact length in device pixel units, defined using a f32 value.

This value will be rounded to the nearest pixel after layout, but it will be used as is in the evaluation of length expressions.

§

Expr(Box<LengthExpr>)

Expression.