Struct zng_ext_font::FontStretch
source · pub struct FontStretch(pub f32);
Expand description
The width of a font as an approximate fraction of the normal width.
Widths range from 0.5 to 2.0 inclusive, with 1.0 as the normal width.
Tuple Fields§
§0: f32
Implementations§
source§impl FontStretch
impl FontStretch
sourcepub const ULTRA_CONDENSED: FontStretch = _
pub const ULTRA_CONDENSED: FontStretch = _
Ultra-condensed width (50%), the narrowest possible.
sourcepub const EXTRA_CONDENSED: FontStretch = _
pub const EXTRA_CONDENSED: FontStretch = _
Extra-condensed width (62.5%).
sourcepub const CONDENSED: FontStretch = _
pub const CONDENSED: FontStretch = _
Condensed width (75%).
sourcepub const SEMI_CONDENSED: FontStretch = _
pub const SEMI_CONDENSED: FontStretch = _
Semi-condensed width (87.5%).
sourcepub const NORMAL: FontStretch = _
pub const NORMAL: FontStretch = _
Normal width (100%).
sourcepub const SEMI_EXPANDED: FontStretch = _
pub const SEMI_EXPANDED: FontStretch = _
Semi-expanded width (112.5%).
sourcepub const EXPANDED: FontStretch = _
pub const EXPANDED: FontStretch = _
Expanded width (125%).
sourcepub const EXTRA_EXPANDED: FontStretch = _
pub const EXTRA_EXPANDED: FontStretch = _
Extra-expanded width (150%).
sourcepub const ULTRA_EXPANDED: FontStretch = _
pub const ULTRA_EXPANDED: FontStretch = _
Ultra-expanded width (200%), the widest possible.
Trait Implementations§
source§impl Clone for FontStretch
impl Clone for FontStretch
source§fn clone(&self) -> FontStretch
fn clone(&self) -> FontStretch
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 FontStretch
impl Debug for FontStretch
source§impl Default for FontStretch
impl Default for FontStretch
source§fn default() -> FontStretch
fn default() -> FontStretch
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for FontStretch
impl<'de> Deserialize<'de> for FontStretch
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Factor> for FontStretch
impl From<Factor> for FontStretch
source§impl From<FactorPercent> for FontStretch
impl From<FactorPercent> for FontStretch
source§fn from(pct: FactorPercent) -> Self
fn from(pct: FactorPercent) -> Self
Converts to this type from the input type.
source§impl From<FontStretch> for Stretch
impl From<FontStretch> for Stretch
source§fn from(value: FontStretch) -> Self
fn from(value: FontStretch) -> Self
Converts to this type from the input type.
source§impl From<FontStretch> for Width
impl From<FontStretch> for Width
source§fn from(value: FontStretch) -> Self
fn from(value: FontStretch) -> Self
Converts to this type from the input type.
source§impl From<Width> for FontStretch
impl From<Width> for FontStretch
source§impl From<f32> for FontStretch
impl From<f32> for FontStretch
source§impl Hash for FontStretch
impl Hash for FontStretch
source§impl IntoVar<FontStretch> for Factor
impl IntoVar<FontStretch> for Factor
source§impl IntoVar<FontStretch> for FactorPercent
impl IntoVar<FontStretch> for FactorPercent
source§impl IntoVar<FontStretch> for f32
impl IntoVar<FontStretch> for f32
source§impl PartialEq for FontStretch
impl PartialEq for FontStretch
source§impl PartialOrd for FontStretch
impl PartialOrd for FontStretch
source§impl Serialize for FontStretch
impl Serialize for FontStretch
source§impl Transitionable for FontStretch
impl Transitionable for FontStretch
source§fn lerp(self, to: &Self, step: EasingStep) -> Self
fn lerp(self, to: &Self, step: EasingStep) -> Self
Sample the linear interpolation from
self
-> to
by step
.impl Copy for FontStretch
impl IntoValue<FontStretch> for Factor
impl IntoValue<FontStretch> for FactorPercent
impl IntoValue<FontStretch> for f32
Auto Trait Implementations§
impl Freeze for FontStretch
impl RefUnwindSafe for FontStretch
impl Send for FontStretch
impl Sync for FontStretch
impl Unpin for FontStretch
impl UnwindSafe for FontStretch
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
)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> 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