pub struct StatTable<'a> {
pub major_version: u16,
pub minor_version: u16,
pub elided_fallback_name_id: Option<u16>,
/* private fields */
}Expand description
STAT Style Attributes Table
https://learn.microsoft.com/en-us/typography/opentype/spec/stat#style-attributes-header
Fields§
§major_version: u16Major version number of the style attributes table.
minor_version: u16Minor version number of the style attributes table.
elided_fallback_name_id: Option<u16>Name ID used as fallback when projection of names into a particular font model produces a subfamily name containing only elidable elements.
Implementations§
Source§impl<'a> StatTable<'a>
impl<'a> StatTable<'a>
Sourcepub fn design_axes(
&'a self,
) -> impl Iterator<Item = Result<AxisRecord, ParseError>> + '_
pub fn design_axes( &'a self, ) -> impl Iterator<Item = Result<AxisRecord, ParseError>> + '_
Iterate over the design axes.
Sourcepub fn design_axis(&self, index: usize) -> Result<AxisRecord, ParseError>
pub fn design_axis(&self, index: usize) -> Result<AxisRecord, ParseError>
Retrieve the design axis at the supplied index.
Sourcepub fn axis_value_tables(
&'a self,
) -> impl Iterator<Item = Result<AxisValueTable<'_>, ParseError>>
pub fn axis_value_tables( &'a self, ) -> impl Iterator<Item = Result<AxisValueTable<'_>, ParseError>>
Iterate over the axis value tables.
Sourcepub fn name_for_axis_value(
&'a self,
axis_index: u16,
value: Fixed,
include_elidable: ElidableName,
) -> Option<u16>
pub fn name_for_axis_value( &'a self, axis_index: u16, value: Fixed, include_elidable: ElidableName, ) -> Option<u16>
Find a name that best describes value in the axis at index
axis_index.
axis_index is the index of the axis in
design_axes.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for StatTable<'a>
impl<'a> RefUnwindSafe for StatTable<'a>
impl<'a> Send for StatTable<'a>
impl<'a> Sync for StatTable<'a>
impl<'a> Unpin for StatTable<'a>
impl<'a> UnwindSafe for StatTable<'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