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
type Color = C
type Color = C
The color type.
Sets the text color.
Sets the background color.
Sets the underline color.
Sets the strikethrough color.
impl<C> TextRenderer for FontTextStyle<C> where
C: PixelColor + Into<Rgb888> + From<Rgb888> + Debug,
impl<C> TextRenderer for FontTextStyle<C> where
C: PixelColor + Into<Rgb888> + From<Rgb888> + Debug,
Auto Trait Implementations
impl<C> !RefUnwindSafe for FontTextStyle<C>
impl<C> !Send for FontTextStyle<C>
impl<C> !Sync for FontTextStyle<C>
impl<C> Unpin for FontTextStyle<C> where
C: Unpin,
impl<C> UnwindSafe for FontTextStyle<C> where
C: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.
Casts the value.
Casts the value.