pub struct ItemVariationStore<'a> {
pub variation_region_list: VariationRegionList<'a>,
pub item_variation_data: Vec<ItemVariationData<'a>>,
}Expand description
Item variation store.
Includes a variation region list, which defines the different regions of the font’s variation space for which variation data is defined. It also includes a set of itemVariationData sub-tables, each of which provides a portion of the total variation data. Each sub-table is associated with some subset of the defined regions, and will include deltas used for one or more target items.
https://learn.microsoft.com/en-us/typography/opentype/spec/otvarcommonformats#variation-data
Fields§
§variation_region_list: VariationRegionList<'a>The variation region list.
item_variation_data: Vec<ItemVariationData<'a>>The item variation data
Implementations§
Source§impl<'a> ItemVariationStore<'a>
impl<'a> ItemVariationStore<'a>
Sourcepub fn adjustment(
&self,
delta_set_entry: DeltaSetIndexMapEntry,
instance: &OwnedTuple,
) -> Result<f32, ParseError>
pub fn adjustment( &self, delta_set_entry: DeltaSetIndexMapEntry, instance: &OwnedTuple, ) -> Result<f32, ParseError>
Retrieve the scaled delta adjustment at the supplied delta_set_entry according to the
user tuple instance.
Sourcepub fn regions(
&self,
index: u16,
) -> Result<impl Iterator<Item = Result<VariationRegion<'a>, ParseError>> + '_, ParseError>
pub fn regions( &self, index: u16, ) -> Result<impl Iterator<Item = Result<VariationRegion<'a>, ParseError>> + '_, ParseError>
Iterate over the variation regions of the ItemVariationData at index.
Sourcepub fn try_to_owned(&self) -> Result<ItemVariationStore, ParseError>
pub fn try_to_owned(&self) -> Result<ItemVariationStore, ParseError>
Returns an owned version of self.
Trait Implementations§
Source§impl<'a> Clone for ItemVariationStore<'a>
impl<'a> Clone for ItemVariationStore<'a>
Source§fn clone(&self) -> ItemVariationStore<'a>
fn clone(&self) -> ItemVariationStore<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ReadBinary for ItemVariationStore<'_>
impl ReadBinary for ItemVariationStore<'_>
Source§impl WriteBinary<&ItemVariationStore<'_>> for ItemVariationStore<'_>
impl WriteBinary<&ItemVariationStore<'_>> for ItemVariationStore<'_>
Auto Trait Implementations§
impl<'a> Freeze for ItemVariationStore<'a>
impl<'a> RefUnwindSafe for ItemVariationStore<'a>
impl<'a> Send for ItemVariationStore<'a>
impl<'a> Sync for ItemVariationStore<'a>
impl<'a> Unpin for ItemVariationStore<'a>
impl<'a> UnwindSafe for ItemVariationStore<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> ReadBinaryDep for Twhere
T: ReadBinary,
impl<T> ReadBinaryDep for Twhere
T: ReadBinary,
type Args<'a> = ()
type HostType<'a> = <T as ReadBinary>::HostType<'a>
fn read_dep<'a>( ctxt: &mut ReadCtxt<'a>, _: <T as ReadBinaryDep>::Args<'_>, ) -> Result<<T as ReadBinaryDep>::HostType<'a>, ParseError>
Source§impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
Source§type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
write_dep.Source§fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
_: <T as WriteBinaryDep<HostType>>::Args,
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError>where
C: WriteContext,
ctxt.