pub struct FvarTable<'a> {
pub major_version: u16,
pub minor_version: u16,
/* private fields */
}Expand description
fvar font Variations Table
https://learn.microsoft.com/en-us/typography/opentype/spec/fvar#fvar-header
Fields§
§major_version: u16Major version number of the font variations table
minor_version: u16Minor version number of the font variations table
Implementations§
Source§impl FvarTable<'_>
impl FvarTable<'_>
Sourcepub fn axes(&self) -> impl Iterator<Item = VariationAxisRecord> + '_
pub fn axes(&self) -> impl Iterator<Item = VariationAxisRecord> + '_
Returns an iterator over the variation axes of the font.
Sourcepub fn axis_count(&self) -> u16
pub fn axis_count(&self) -> u16
Returns the number of variation axes in the font.
Sourcepub fn instances(
&self,
) -> impl Iterator<Item = Result<InstanceRecord<'_>, ParseError>> + '_
pub fn instances( &self, ) -> impl Iterator<Item = Result<InstanceRecord<'_>, ParseError>> + '_
Returns an iterator over the pre-defined instances in the font.
Sourcepub fn normalize(
&self,
user_tuple: impl ExactSizeIterator<Item = Fixed>,
avar: Option<&AvarTable<'_>>,
) -> Result<OwnedTuple, ParseError>
pub fn normalize( &self, user_tuple: impl ExactSizeIterator<Item = Fixed>, avar: Option<&AvarTable<'_>>, ) -> Result<OwnedTuple, ParseError>
Turn a user tuple into a tuple normalized over the range -1..1.
Sourcepub fn owned_tuple(&self, values: &[F2Dot14]) -> Option<OwnedTuple>
pub fn owned_tuple(&self, values: &[F2Dot14]) -> Option<OwnedTuple>
Construct a new OwnedTuple.
Returns None if the number of elements in values does not match
axis_count.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FvarTable<'a>
impl<'a> RefUnwindSafe for FvarTable<'a>
impl<'a> Send for FvarTable<'a>
impl<'a> Sync for FvarTable<'a>
impl<'a> Unpin for FvarTable<'a>
impl<'a> UnwindSafe for FvarTable<'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> 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