Struct speedy2d::font::TextOptions
source · [−]pub struct TextOptions { /* private fields */ }
Expand description
A series of options for specifying how text should be laid out.
Implementations
Sets the tracking of the font. This is the amount of extra space (in pixels) to put between each character.
The default is 0.0
.
pub fn with_wrap_to_width(
self,
wrap_words_after_width_px: f32,
alignment: TextAlignment
) -> Self
pub fn with_wrap_to_width(
self,
wrap_words_after_width_px: f32,
alignment: TextAlignment
) -> Self
Limits the width of the text block to the specified pixel value, wrapping words to a new line if they exceed that limit.
This function also sets the alignment, within the specified width.
The default is to not wrap text.
Sets the amount of space between each line of text. The gap between the baseline of each line of text is multiplied by this value.
The default is 1.0
.