Struct zng::font::FontWeight
source · pub struct FontWeight(pub f32);
Expand description
The degree of stroke thickness of a font. This value ranges from 100.0 to 900.0, with 400.0 as normal.
Tuple Fields§
§0: f32
Implementations§
source§impl FontWeight
impl FontWeight
sourcepub const THIN: FontWeight = _
pub const THIN: FontWeight = _
Thin weight (100), the thinnest value.
sourcepub const EXTRA_LIGHT: FontWeight = _
pub const EXTRA_LIGHT: FontWeight = _
Extra light weight (200).
sourcepub const LIGHT: FontWeight = _
pub const LIGHT: FontWeight = _
Light weight (300).
sourcepub const NORMAL: FontWeight = _
pub const NORMAL: FontWeight = _
Normal (400).
sourcepub const MEDIUM: FontWeight = _
pub const MEDIUM: FontWeight = _
Medium weight (500, higher than normal).
sourcepub const SEMIBOLD: FontWeight = _
pub const SEMIBOLD: FontWeight = _
Semi-bold weight (600).
sourcepub const BOLD: FontWeight = _
pub const BOLD: FontWeight = _
Bold weight (700).
sourcepub const EXTRA_BOLD: FontWeight = _
pub const EXTRA_BOLD: FontWeight = _
Extra-bold weight (800).
sourcepub const BLACK: FontWeight = _
pub const BLACK: FontWeight = _
Black weight (900), the thickest value.
Trait Implementations§
source§impl Clone for FontWeight
impl Clone for FontWeight
source§fn clone(&self) -> FontWeight
fn clone(&self) -> FontWeight
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FontWeight
impl Debug for FontWeight
source§impl Default for FontWeight
impl Default for FontWeight
source§fn default() -> FontWeight
fn default() -> FontWeight
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for FontWeight
impl<'de> Deserialize<'de> for FontWeight
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FontWeight, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FontWeight, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<AnsiWeight> for FontWeight
impl From<AnsiWeight> for FontWeight
source§fn from(weight: AnsiWeight) -> FontWeight
fn from(weight: AnsiWeight) -> FontWeight
Converts to this type from the input type.
source§impl From<Weight> for FontWeight
impl From<Weight> for FontWeight
source§fn from(value: Weight) -> FontWeight
fn from(value: Weight) -> FontWeight
Converts to this type from the input type.
source§impl From<f32> for FontWeight
impl From<f32> for FontWeight
source§fn from(weight: f32) -> FontWeight
fn from(weight: f32) -> FontWeight
Converts to this type from the input type.
source§impl From<u32> for FontWeight
impl From<u32> for FontWeight
source§fn from(weight: u32) -> FontWeight
fn from(weight: u32) -> FontWeight
Converts to this type from the input type.
source§impl Hash for FontWeight
impl Hash for FontWeight
source§impl IntoVar<FontWeight> for AnsiWeight
impl IntoVar<FontWeight> for AnsiWeight
source§fn into_var(self) -> <AnsiWeight as IntoVar<FontWeight>>::Var
fn into_var(self) -> <AnsiWeight as IntoVar<FontWeight>>::Var
Converts the source value into a var.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<FontWeight> for f32
impl IntoVar<FontWeight> for f32
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<FontWeight> for u32
impl IntoVar<FontWeight> for u32
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl PartialEq for FontWeight
impl PartialEq for FontWeight
source§impl PartialOrd for FontWeight
impl PartialOrd for FontWeight
source§impl Serialize for FontWeight
impl Serialize for FontWeight
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl Transitionable for FontWeight
impl Transitionable for FontWeight
source§fn lerp(self, to: &FontWeight, step: Factor) -> FontWeight
fn lerp(self, to: &FontWeight, step: Factor) -> FontWeight
Sample the linear interpolation from
self
-> to
by step
.impl Copy for FontWeight
impl IntoValue<FontWeight> for AnsiWeight
impl IntoValue<FontWeight> for f32
impl IntoValue<FontWeight> for u32
Auto Trait Implementations§
impl Freeze for FontWeight
impl RefUnwindSafe for FontWeight
impl Send for FontWeight
impl Sync for FontWeight
impl Unpin for FontWeight
impl UnwindSafe for FontWeight
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self
equals other
.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.