pub enum Subtables<'a, T: FontRead<'a>, Ext: ExtensionLookup<'a, T>> {
Subtable(ArrayOfOffsets<'a, T>),
Extension(ArrayOfOffsets<'a, Ext>),
}
Expand description
an array of subtables, maybe behind extension lookups
This is used to implement more ergonomic access to lookup subtables for GPOS & GSUB lookup tables.
Variants§
Subtable(ArrayOfOffsets<'a, T>)
Extension(ArrayOfOffsets<'a, Ext>)
Implementations§
Source§impl<'a, T: FontRead<'a> + 'a, Ext: ExtensionLookup<'a, T> + 'a> Subtables<'a, T, Ext>
impl<'a, T: FontRead<'a> + 'a, Ext: ExtensionLookup<'a, T> + 'a> Subtables<'a, T, Ext>
Sourcepub(crate) fn new(
offsets: &'a [BigEndian<Offset16>],
data: FontData<'a>,
) -> Self
pub(crate) fn new( offsets: &'a [BigEndian<Offset16>], data: FontData<'a>, ) -> Self
create a new subtables array given offsets to non-extension subtables
Sourcepub(crate) fn new_ext(
offsets: &'a [BigEndian<Offset16>],
data: FontData<'a>,
) -> Self
pub(crate) fn new_ext( offsets: &'a [BigEndian<Offset16>], data: FontData<'a>, ) -> Self
create a new subtables array given offsets to extension subtables
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<'a, T: FontRead<'a> + GlyphClosure + 'a, Ext: ExtensionLookup<'a, T> + 'a> GlyphClosure for Subtables<'a, T, Ext>
impl<'a, T: FontRead<'a> + GlyphClosure + 'a, Ext: ExtensionLookup<'a, T> + 'a> GlyphClosure for Subtables<'a, T, Ext>
Source§fn closure_glyphs(
&self,
ctx: &mut ClosureCtx<'_>,
lookup_list: &SubstitutionLookupList<'_>,
lookup_index: u16,
) -> Result<(), ReadError>
fn closure_glyphs( &self, ctx: &mut ClosureCtx<'_>, lookup_list: &SubstitutionLookupList<'_>, lookup_index: u16, ) -> Result<(), ReadError>
Update the set of glyphs with any glyphs reachable via substitution.
fn may_have_non_1to1(&self) -> Result<bool, ReadError>
Source§impl<'a, T, Ext> LookupClosure for Subtables<'a, T, Ext>
impl<'a, T, Ext> LookupClosure for Subtables<'a, T, Ext>
fn closure_lookups( &self, c: &mut LookupClosureCtx<'_>, arg: u16, ) -> Result<(), ReadError>
Auto Trait Implementations§
impl<'a, T, Ext> Freeze for Subtables<'a, T, Ext>
impl<'a, T, Ext> RefUnwindSafe for Subtables<'a, T, Ext>
impl<'a, T, Ext> Send for Subtables<'a, T, Ext>
impl<'a, T, Ext> Sync for Subtables<'a, T, Ext>
impl<'a, T, Ext> Unpin for Subtables<'a, T, Ext>
impl<'a, T, Ext> UnwindSafe for Subtables<'a, T, Ext>
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