[−]Struct druid::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
pub const THIN: FontWeight
pub const HAIRLINE: FontWeight
pub const EXTRA_LIGHT: FontWeight
pub const LIGHT: FontWeight
pub const REGULAR: FontWeight
pub const NORMAL: FontWeight
pub const MEDIUM: FontWeight
pub const SEMI_BOLD: FontWeight
pub const BOLD: FontWeight
pub const EXTRA_BOLD: FontWeight
pub const BLACK: FontWeight
pub const HEAVY: FontWeight
pub const EXTRA_BLACK: FontWeight
pub fn new(raw: u16) -> FontWeight
Create a new FontWeight
with a custom value.
Values will be clamped to the range 1..=1000.
pub const fn to_raw(self) -> u16
Return the raw value as a u16.
Trait Implementations
impl Clone for FontWeight
pub fn clone(&self) -> FontWeight
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FontWeight
impl Data for FontWeight
[src]
impl Debug for FontWeight
impl Default for FontWeight
pub fn default() -> FontWeight
impl Eq for FontWeight
impl From<FontWeight> for TextAttribute
pub fn from(src: FontWeight) -> TextAttribute
impl Hash for FontWeight
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<FontWeight> for FontWeight
pub fn eq(&self, other: &FontWeight) -> bool
pub fn ne(&self, other: &FontWeight) -> bool
impl StructuralEq for FontWeight
impl StructuralPartialEq for FontWeight
Auto Trait Implementations
impl RefUnwindSafe for FontWeight
[src]
impl Send for FontWeight
[src]
impl Sync for FontWeight
[src]
impl Unpin for FontWeight
[src]
impl UnwindSafe for FontWeight
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AnyEq for T where
T: PartialEq<T> + Any,
[src]
T: PartialEq<T> + Any,
pub fn equals(&self, other: &(dyn Any + 'static)) -> bool
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub 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> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,