[−][src]Struct directwrite::enums::FontWeight
Represents the density of a typeface, in terms of the lightness or heaviness of the strokes. The enumerated values correspond to the usWeightClass definition in the OpenType specification. The usWeightClass represents an integer value between 1 and 999. Lower values indicate lighter weights; higher values indicate heavier weights.
Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a typeface, as compared to a "normal" character from that same typeface. The following illustration shows an example of Normal and UltraBold weights for the Palatino Linotype typeface.
Note Not all weights are available for all typefaces. When a weight is not available for a typeface, the closest matching weight is returned.
Font weight values less than 1 or greater than 999 are considered invalid, and they are rejected by font API functions.
Methods
impl FontWeight
[src]
pub const THIN: FontWeight
[src]
Predefined font weight : Thin (100).
pub const EXTRA_LIGHT: FontWeight
[src]
Predefined font weight : Extra-light (200).
pub const ULTRA_LIGHT: FontWeight
[src]
Predefined font weight : Ultra-light (200).
pub const LIGHT: FontWeight
[src]
Predefined font weight : Light (300).
pub const SEMI_LIGHT: FontWeight
[src]
Predefined font weight : Semi-light (350).
pub const NORMAL: FontWeight
[src]
Predefined font weight : Normal (400).
pub const REGULAR: FontWeight
[src]
Predefined font weight : Regular (400).
pub const MEDIUM: FontWeight
[src]
Predefined font weight : Medium (500).
pub const DEMI_BOLD: FontWeight
[src]
Predefined font weight : Demi-bold (600).
pub const SEMI_BOLD: FontWeight
[src]
Predefined font weight : Semi-bold (600).
pub const BOLD: FontWeight
[src]
Predefined font weight : Bold (700).
pub const EXTRA_BOLD: FontWeight
[src]
Predefined font weight : Extra-bold (800).
pub const ULTRA_BOLD: FontWeight
[src]
Predefined font weight : Ultra-bold (800).
pub const BLACK: FontWeight
[src]
Predefined font weight : Black (900).
pub const HEAVY: FontWeight
[src]
Predefined font weight : Heavy (900).
pub const EXTRA_BLACK: FontWeight
[src]
Predefined font weight : Extra-black (950).
pub const ULTRA_BLACK: FontWeight
[src]
Predefined font weight : Ultra-black (950).
Trait Implementations
impl PartialEq<FontWeight> for FontWeight
[src]
fn eq(&self, other: &FontWeight) -> bool
[src]
fn ne(&self, other: &FontWeight) -> bool
[src]
impl Ord for FontWeight
[src]
fn cmp(&self, other: &FontWeight) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Clone for FontWeight
[src]
fn clone(&self) -> FontWeight
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for FontWeight
[src]
impl Copy for FontWeight
[src]
impl PartialOrd<FontWeight> for FontWeight
[src]
fn partial_cmp(&self, other: &FontWeight) -> Option<Ordering>
[src]
fn lt(&self, other: &FontWeight) -> bool
[src]
fn le(&self, other: &FontWeight) -> bool
[src]
fn gt(&self, other: &FontWeight) -> bool
[src]
fn ge(&self, other: &FontWeight) -> bool
[src]
impl Hash for FontWeight
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for FontWeight
[src]
Auto Trait Implementations
impl Send for FontWeight
impl Sync for FontWeight
Blanket Implementations
impl<T> FontKey for T where
T: Send + Sync + 'static + ?Sized,
[src]
T: Send + Sync + 'static + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,