Struct swash::Attributes [−][src]
pub struct Attributes(_);
Primary attributes for font classification: stretch, weight and style.
This struct is created by the attributes
method on FontRef
.
Implementations
impl Attributes
[src]
impl Attributes
[src]pub fn new(stretch: Stretch, weight: Weight, style: Style) -> Self
[src]
Creates new font attributes from the specified stretch, weight and style.
pub fn from_font<'a>(font: &FontRef<'a>) -> Self
[src]
Extracts the attributes from the specified font.
pub fn stretch(&self) -> Stretch
[src]
Returns the stretch attribute.
pub fn weight(&self) -> Weight
[src]
Returns the weight attribute.
pub fn style(&self) -> Style
[src]
Returns the style attribute.
pub fn parts(&self) -> (Stretch, Weight, Style)
[src]
Returns a tuple containing all attributes.
pub fn has_variations(&self) -> bool
[src]
Returns true if the font has variations corresponding to primary attributes.
pub fn has_stretch_variation(&self) -> bool
[src]
Returns true if the font has a variation for the stretch attribute.
pub fn has_weight_variation(&self) -> bool
[src]
Returns true if the font has a variation for the weight attribute.
pub fn has_oblique_variation(&self) -> bool
[src]
Returns true if the font has a variation for the oblique style attribute.
pub fn has_italic_variation(&self) -> bool
[src]
Returns true if the font has a variation for the italic style attribute.
pub fn synthesize(&self, requested: Attributes) -> Synthesis
[src]
Returns a synthesis analysis based on the requested attributes with respect to this set of attributes.
Trait Implementations
impl Clone for Attributes
[src]
impl Clone for Attributes
[src]fn clone(&self) -> Attributes
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Attributes
[src]
impl Copy for Attributes
[src]impl Default for Attributes
[src]
impl Default for Attributes
[src]impl Eq for Attributes
[src]
impl Eq for Attributes
[src]impl Hash for Attributes
[src]
impl Hash for Attributes
[src]Auto Trait Implementations
impl RefUnwindSafe for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
impl UnwindSafe for Attributes