Struct embedded_font::FontTextStyle[][src]

pub struct FontTextStyle<C: PixelColor> {
    pub text_color: Option<C>,
    pub background_color: Option<C>,
    pub underline_color: DecorationColor<C>,
    pub strikethrough_color: DecorationColor<C>,
    pub font_size: u32,
    // some fields omitted
}
Expand description

Style properties for text using a ttf and otf font.

A FontTextStyle can be applied to a [Text] object to define how the text is drawn.

Fields

text_color: Option<C>

Text color.

background_color: Option<C>

Background color.

underline_color: DecorationColor<C>

Underline color.

strikethrough_color: DecorationColor<C>

Strikethrough color.

font_size: u32

Font size.

Implementations

Trait Implementations

The color type.

Sets the text color.

Sets the background color.

Sets the underline color.

Sets the strikethrough color.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Color type.

Draws a string. Read more

Draws whitespace of the given width. Read more

Returns the text metrics for a string. Read more

Returns the default line height. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Performs the conversion.

Performs the conversion.

Casts the value.

Casts the value.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.