[][src]Struct piet::FontWeight

pub struct FontWeight(_);

A font weight, represented as a value in the range 1..=1000.

This is based on the CSS font-weight property. In general, you should prefer the constants defined on this type, such as FontWeight::REGULAR or FontWeight::BOLD.

Implementations

impl FontWeight[src]

pub const THIN: FontWeight[src]

pub const HAIRLINE: FontWeight[src]

pub const EXTRA_LIGHT: FontWeight[src]

pub const LIGHT: FontWeight[src]

pub const REGULAR: FontWeight[src]

pub const NORMAL: FontWeight[src]

pub const MEDIUM: FontWeight[src]

pub const SEMI_BOLD: FontWeight[src]

pub const BOLD: FontWeight[src]

pub const EXTRA_BOLD: FontWeight[src]

pub const BLACK: FontWeight[src]

pub const HEAVY: FontWeight[src]

pub const EXTRA_BLACK: FontWeight[src]

pub fn new(raw: u16) -> FontWeight[src]

Create a new FontWeight with a custom value.

Values will be clamped to the range 1..=1000.

pub const fn to_raw(self) -> u16[src]

Return the raw value as a u16.

Trait Implementations

impl Clone for FontWeight[src]

impl Copy for FontWeight[src]

impl Debug for FontWeight[src]

impl Default for FontWeight[src]

impl Eq for FontWeight[src]

impl From<FontWeight> for TextAttribute[src]

impl PartialEq<FontWeight> for FontWeight[src]

impl StructuralEq for FontWeight[src]

impl StructuralPartialEq for FontWeight[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.