pub struct Variation<'a> { /* private fields */ }
Expand description
Axis of variation in a variable font.
Implementations§
source§impl<'a> Variation<'a>
impl<'a> Variation<'a>
sourcepub fn name(&self, language: Option<&str>) -> Option<LocalizedString<'a>>
pub fn name(&self, language: Option<&str>) -> Option<LocalizedString<'a>>
Returns the name for the variation, optionally for a particular language.
Returns true if the variation should be hidden from users.
sourcepub fn default_value(&self) -> f32
pub fn default_value(&self) -> f32
Returns the default value of the variation.
sourcepub fn normalize(&self, value: f32) -> NormalizedCoord
pub fn normalize(&self, value: f32) -> NormalizedCoord
Computes a normalized coordinate for the specified value.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Variation<'a>
impl<'a> RefUnwindSafe for Variation<'a>
impl<'a> Send for Variation<'a>
impl<'a> Sync for Variation<'a>
impl<'a> Unpin for Variation<'a>
impl<'a> UnwindSafe for Variation<'a>
Blanket Implementations§
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
)