pub struct TextStyle {
pub font_size: u32,
pub color: Color,
pub font_file: Option<PathBuf>,
pub box_color: Option<Color>,
pub box_border_width: u32,
}Expand description
Fields§
§font_size: u32Font size in points.
color: ColorFill color of the text (alpha = opacity).
font_file: Option<PathBuf>Optional path to a TrueType font file. A default font is used when None.
box_color: Option<Color>Optional background box color behind the text (alpha = box opacity). No box
when None.
box_border_width: u32Background box padding in pixels. Ignored when box_color
is None.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextStyle
impl<'de> Deserialize<'de> for TextStyle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TextStyle
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe for TextStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more