pub struct TupleVariationHeader<'a, T> { /* private fields */ }Expand description
Implementations§
Source§impl<'data> TupleVariationHeader<'data, Gvar>
impl<'data> TupleVariationHeader<'data, Gvar>
Sourcepub fn variation_data<'a>(
&'a self,
num_points: NumPoints,
shared_point_numbers: Option<SharedPointNumbers<'a>>,
) -> Result<GvarVariationData<'a>, ParseError>
pub fn variation_data<'a>( &'a self, num_points: NumPoints, shared_point_numbers: Option<SharedPointNumbers<'a>>, ) -> Result<GvarVariationData<'a>, ParseError>
Read the variation data for gvar.
num_points is the number of points in the glyph this variation relates
to.
Sourcepub fn tuple_index(&self) -> Option<u16>
pub fn tuple_index(&self) -> Option<u16>
Returns the index of the shared tuple that this header relates to.
The tuple index is an index into the shared tuples of the Gvar table.
Pass this value to the shared_tuple
method to retrieve the tuple.
The value returned from this method will be None if the header has an
embedded peak tuple.
Sourcepub fn peak_tuple<'a>(
&'a self,
gvar: &'a GvarTable<'data>,
) -> Result<ReadTuple<'data>, ParseError>
pub fn peak_tuple<'a>( &'a self, gvar: &'a GvarTable<'data>, ) -> Result<ReadTuple<'data>, ParseError>
Returns the peak tuple for this tuple variation record.
If the record contains an embedded peak tuple then that is returned, otherwise the referenced shared peak tuple is returned.
Source§impl<'data> TupleVariationHeader<'data, Cvar>
impl<'data> TupleVariationHeader<'data, Cvar>
Sourcepub fn peak_tuple(&self) -> Option<ReadTuple<'data>>
pub fn peak_tuple(&self) -> Option<ReadTuple<'data>>
Returns the embedded peak tuple if present.
The peak tuple is meant to always be present in cvar tuple variations,
so None indicates an invalid font.
Source§impl<'data, T> TupleVariationHeader<'data, T>
impl<'data, T> TupleVariationHeader<'data, T>
Sourcepub fn intermediate_region(
&self,
) -> Option<(ReadTuple<'data>, ReadTuple<'data>)>
pub fn intermediate_region( &self, ) -> Option<(ReadTuple<'data>, ReadTuple<'data>)>
Returns the intermediate region of the tuple variation space that this variation applies to.
If an intermediate region is not specified (the region is implied by the
peak tuple) then this will be None.
Trait Implementations§
Source§impl Debug for TupleVariationHeader<'_, Gvar>
impl Debug for TupleVariationHeader<'_, Gvar>
Source§impl<T> ReadBinaryDep for TupleVariationHeader<'_, T>
impl<T> ReadBinaryDep for TupleVariationHeader<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for TupleVariationHeader<'a, T>
impl<'a, T> RefUnwindSafe for TupleVariationHeader<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for TupleVariationHeader<'a, T>where
T: Send,
impl<'a, T> Sync for TupleVariationHeader<'a, T>where
T: Sync,
impl<'a, T> Unpin for TupleVariationHeader<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for TupleVariationHeader<'a, T>where
T: UnwindSafe,
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> 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 more