Struct fit_text::TextFormat [−][src]
pub struct TextFormat {
pub font_size: u32,
pub line_spacing: f64,
pub first_line_indent: Indent,
pub lines_indent: Indent,
pub color: Color,
pub resize: Resize,
}
Expand description
A format for some text
Fields
font_size: u32
The font size
line_spacing: f64
The spacing between lines. This should usually be somewhere
between 1.0
and 2.0
, but any scalar is valid
first_line_indent: Indent
The number of spaces to indent the first line of a paragraph
lines_indent: Indent
The number of spaces to indent all lines of a paragraph after the first
color: Color
The color of the text
resize: Resize
The resize strategy
Implementations
Create a default TextFormat
with the given font size
Use this TextFormat
as the global default
Set the line spacing
Set the indentation of the first line
Set the indentation of all lines after the first
Change the font size depending on the the resize strategy
The given max size is not used if the strategy is Resize::None
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for TextFormat
impl Send for TextFormat
impl Sync for TextFormat
impl Unpin for TextFormat
impl UnwindSafe for TextFormat
Blanket Implementations
Mutably borrows from an owned value. Read more