AxisValueTable

Enum AxisValueTable 

Source
pub enum AxisValueTable<'a> {
    Format1(AxisValueTableFormat1),
    Format2(AxisValueTableFormat2),
    Format3(AxisValueTableFormat3),
    Format4(AxisValueTableFormat4<'a>),
}
Expand description

Axis value table.

Axis value tables provide details regarding a specific style-attribute value on some specific axis of design variation, or a combination of design-variation axis values, and the relationship of those values to labels used as elements in subfamily names.

https://learn.microsoft.com/en-us/typography/opentype/spec/stat#axis-value-tables

Variants§

§

Format1(AxisValueTableFormat1)

Format 1 axis value table: name associated with a value.

§

Format2(AxisValueTableFormat2)

Format 2 axis value table: name associated with a range of values.

§

Format3(AxisValueTableFormat3)

Format 3 axis value table: name associated with a value and style-linked mapping.

§

Format4(AxisValueTableFormat4<'a>)

Format 4 axis value table: name associated with a value for each design axis.

Implementations§

Source§

impl AxisValueTable<'_>

Source

pub fn flags(&self) -> AxisValueTableFlags

Retrieve the flags for this axis value table.

Source

pub fn value_name_id(&self) -> u16

Retrieve the name id in the NAME table for this value.

Source

pub fn is_elidable(&self) -> bool

If set, it indicates that the axis value represents the “normal” value for the axis and may be omitted when composing name strings.

Trait Implementations§

Source§

impl<'a> Debug for AxisValueTable<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ReadBinaryDep for AxisValueTable<'_>

Source§

type Args<'a> = u16

Source§

type HostType<'a> = AxisValueTable<'a>

Source§

fn read_dep<'a>( ctxt: &mut ReadCtxt<'a>, design_axis_count: u16, ) -> Result<Self::HostType<'a>, ParseError>

Auto Trait Implementations§

§

impl<'a> Freeze for AxisValueTable<'a>

§

impl<'a> RefUnwindSafe for AxisValueTable<'a>

§

impl<'a> Send for AxisValueTable<'a>

§

impl<'a> Sync for AxisValueTable<'a>

§

impl<'a> Unpin for AxisValueTable<'a>

§

impl<'a> UnwindSafe for AxisValueTable<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.