[−][src]Struct piet::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]
fn clone(&self) -> FontWeight
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn from(src: FontWeight) -> TextAttribute
[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,
impl PartialEq<FontWeight> for FontWeight
[src]
fn eq(&self, other: &FontWeight) -> bool
[src]
fn ne(&self, other: &FontWeight) -> bool
[src]
impl StructuralEq for FontWeight
[src]
impl StructuralPartialEq for FontWeight
[src]
Auto Trait Implementations
impl RefUnwindSafe for FontWeight
impl Send for FontWeight
impl Sync for FontWeight
impl Unpin for FontWeight
impl UnwindSafe for FontWeight
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,