pub struct Axis { /* private fields */ }
Expand description
Axis of variation in a variable font.
In variable fonts, an axis usually refers to a single aspect of a typeface’s design that can be altered by the user.
See https://fonts.google.com/knowledge/glossary/axis_in_variable_fonts
Implementations§
source§impl Axis
impl Axis
sourcepub fn name_id(&self) -> StringId
pub fn name_id(&self) -> StringId
Returns the localized string identifier for the name of the axis.
Returns true if the axis should be hidden in user interfaces.
sourcepub fn default_value(&self) -> f32
pub fn default_value(&self) -> f32
Returns the default value of the axis.
sourcepub fn normalize(&self, coord: f32) -> NormalizedCoord
pub fn normalize(&self, coord: f32) -> NormalizedCoord
Returns a normalized coordinate for the given user coordinate.
The value will be clamped to the range specified by the minimum and maximum values.
This does not apply any axis variation remapping.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Axis
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnwindSafe for Axis
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
)