Type Alias zng_ext_font::ParagraphSpacing

source ·
pub type ParagraphSpacing = Length;
Expand description

Extra spacing in-between paragraphs.

The initial paragraph space is line_height + line_spacing * 2, this extra spacing is added to that.

A “paragraph” is a sequence of lines in-between wgt lines (empty or spaces only). This extra space is applied per wgt line not per paragraph, if there are three wgt lines between paragraphs the extra spacing is applied trice.

The Default value is zero.

Aliased Type§

enum ParagraphSpacing {
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.