Type Alias zng_ext_font::WordSpacing
source · pub type WordSpacing = Length;
Expand description
Extra spacing added to the Unicode U+0020 SPACE
character.
Word spacing is done using the space character “advance” as defined in the font, this unit represents extra spacing added to that default spacing.
A “word” is the sequence of characters in-between space characters. This extra
spacing is applied per space character not per word, if there are three spaces between words
the extra spacing is applied thrice. Usually the number of spaces between words is collapsed to one,
see WhiteSpace
.
The Default
value signals that word spacing can be tweaked when text justification is enabled, all other
values disable automatic adjustments for justification. Relative values are computed from the length of the space ' '
character,
so a word spacing of 100.pct()
visually adds another space in between words.
Aliased Type§
enum WordSpacing {
}
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.