Struct font_kit::properties::Weight [−][src]
pub struct Weight(pub f32);
The degree of blackness or stroke thickness of a font. This value ranges from 100.0 to 900.0, with 400.0 as normal.
Methods
impl Weight
[src]
impl Weight
pub const THIN: Weight
THIN: Weight = Weight(100.0)
Thin weight (100), the thinnest value.
pub const EXTRA_LIGHT: Weight
EXTRA_LIGHT: Weight = Weight(200.0)
Extra light weight (200).
pub const LIGHT: Weight
LIGHT: Weight = Weight(300.0)
Light weight (300).
pub const NORMAL: Weight
NORMAL: Weight = Weight(400.0)
Normal (400).
pub const MEDIUM: Weight
MEDIUM: Weight = Weight(500.0)
Medium weight (500, higher than normal).
pub const SEMIBOLD: Weight
SEMIBOLD: Weight = Weight(600.0)
Semibold weight (600).
pub const BOLD: Weight
BOLD: Weight = Weight(700.0)
Bold weight (700).
pub const EXTRA_BOLD: Weight
EXTRA_BOLD: Weight = Weight(800.0)
Extra-bold weight (800).
pub const BLACK: Weight
BLACK: Weight = Weight(900.0)
Black weight (900), the thickest value.
Trait Implementations
impl Clone for Weight
[src]
impl Clone for Weight
fn clone(&self) -> Weight
[src]
fn clone(&self) -> Weight
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Weight
[src]
impl Copy for Weight
impl Debug for Weight
[src]
impl Debug for Weight
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Weight
[src]
impl PartialEq for Weight
fn eq(&self, other: &Weight) -> bool
[src]
fn eq(&self, other: &Weight) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Weight) -> bool
[src]
fn ne(&self, other: &Weight) -> bool
This method tests for !=
.
impl PartialOrd for Weight
[src]
impl PartialOrd for Weight
fn partial_cmp(&self, other: &Weight) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Weight) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Weight) -> bool
[src]
fn lt(&self, other: &Weight) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Weight) -> bool
[src]
fn le(&self, other: &Weight) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Weight) -> bool
[src]
fn gt(&self, other: &Weight) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Weight) -> bool
[src]
fn ge(&self, other: &Weight) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Default for Weight
[src]
impl Default for Weight