pub struct OtData<'a> {
cache: &'a OtCache,
tables: &'a CachedTables<'a>,
var_store: Option<&'a ItemVariationStore<'a>>,
pub coords: &'a [F2Dot14],
pub feature_variations: [Option<u32>; 2],
pub has_lookup_variations: bool,
}Expand description
The OpenType layout data of a font, borrowed from its layout cache.
Fields§
§cache: &'a OtCache§tables: &'a CachedTables<'a>§var_store: Option<&'a ItemVariationStore<'a>>The variation store, if the font is variable and has an instance.
coords: &'a [F2Dot14]§feature_variations: [Option<u32>; 2]§has_lookup_variations: boolWhether a layout table has lookup variations, which plans then
resolve per feature at coords.
Implementations§
Source§impl<'a> OtData<'a>
impl<'a> OtData<'a>
pub fn new( cache: &'a OtCache, coords: &'a [F2Dot14], variations: SelectedFeatureVariations, ) -> Self
pub fn gsub(&self) -> Option<GsubTable<'a>>
pub fn gpos(&self) -> Option<GposTable<'a>>
Sourcepub fn var_store(&self) -> Option<&'a ItemVariationStore<'a>>
pub fn var_store(&self) -> Option<&'a ItemVariationStore<'a>>
The variation store, if the font is variable and has an instance.
pub(crate) fn layout_table( &self, table_index: LayoutTableKind, ) -> Option<LayoutTable<'a>>
pub(crate) fn layout_tables( &self, ) -> impl Iterator<Item = (LayoutTableKind, LayoutTable<'a>)> + '_
pub fn has_glyph_classes(&self) -> bool
pub fn glyph_class(&self, glyph_id: u32) -> u16
pub fn glyph_mark_attachment_class(&self, glyph_id: u32) -> u16
pub(crate) fn glyph_props(&self, glyph: GlyphId) -> u16
pub fn is_mark_glyph(&self, glyph_id: u32, set_index: u16) -> bool
pub fn lookup( &self, table_index: LayoutTableKind, lookup_index: u16, ) -> Option<&'a CachedLookup<'a>>
pub(crate) fn resolve_anchor(&self, anchor: &AnchorTable<'_>) -> (f32, f32)
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for OtData<'a>
impl<'a> !UnwindSafe for OtData<'a>
impl<'a> Freeze for OtData<'a>
impl<'a> Send for OtData<'a>
impl<'a> Sync for OtData<'a>
impl<'a> Unpin for OtData<'a>
impl<'a> UnsafeUnpin for OtData<'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