pub enum TextAlign {
Start,
End,
Center,
Justify,
Left,
Right,
}Expand description
How the lines of a piece of text are aligned inside the box it was given.
It is not the same question as where the box goes. A centred paragraph and a centred box look identical while the text is one line and stop looking identical the moment it wraps, which is when the setting starts to matter.
Variants§
Start
The start of the reading direction: the left in a left-to-right script, the right in a right-to-left one. The default, and the only one that follows the text.
End
The end of the reading direction.
Center
Centred in the box.
Justify
Both edges flush, the space stretched between the words. Every line but the last.
Left
The left edge, whatever the script. A column of figures wants this and not
TextAlign::Start, because the figures do not change direction with the prose
around them.
Right
The right edge, whatever the script.