Struct cosmic_text::Attrs
source · pub struct Attrs<'a> {
pub color_opt: Option<Color>,
pub family: Family<'a>,
pub monospaced: bool,
pub stretch: Stretch,
pub style: Style,
pub weight: Weight,
}
Expand description
Text attributes
Fields§
§color_opt: Option<Color>
§family: Family<'a>
§monospaced: bool
§stretch: Stretch
§style: Style
§weight: Weight
Implementations§
source§impl<'a> Attrs<'a>
impl<'a> Attrs<'a>
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new set of attributes with sane defaults
This defaults to a regular Sans-Serif font.
sourcepub fn monospaced(self, monospaced: bool) -> Self
pub fn monospaced(self, monospaced: bool) -> Self
Set monospaced
sourcepub fn compatible(&self, other: &Self) -> bool
pub fn compatible(&self, other: &Self) -> bool
Check if this set of attributes can be shaped with another