pub struct Lookup<'a, T = ()> {
data: FontData<'a>,
offset_type: PhantomData<*const T>,
}Expand description
Fields§
§data: FontData<'a>§offset_type: PhantomData<*const T>Implementations§
Source§impl<'a, T> Lookup<'a, T>
impl<'a, T> Lookup<'a, T>
Sourcepub(crate) fn of_unit_type(&self) -> Lookup<'a, ()>
pub(crate) fn of_unit_type(&self) -> Lookup<'a, ()>
Replace the specific generic type on this implementation with ()
Source§impl<'a, T> Lookup<'a, T>
impl<'a, T> Lookup<'a, T>
pub const MIN_SIZE: usize
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a>>( &self, offset: O, ) -> Result<R, ReadError>
Resolve the provided offset from the start of this table.
Sourcepub fn offset_data(&self) -> FontData<'a>
pub fn offset_data(&self) -> FontData<'a>
Return a reference to this table’s raw data.
We use this in the compile crate to resolve offsets.
Sourcepub fn shape(&self) -> &Self
👎Deprecated: just use the base type directly
pub fn shape(&self) -> &Self
Return a reference to the table’s ‘Shape’ struct.
This is a low level implementation detail, but it can be useful in some cases where you want to know things about a table’s layout, such as the byte offsets of specific fields.
Sourcepub fn lookup_type(&self) -> u16
pub fn lookup_type(&self) -> u16
Different enumerations for GSUB and GPOS
Sourcepub fn lookup_flag(&self) -> LookupFlag
pub fn lookup_flag(&self) -> LookupFlag
Lookup qualifiers
Sourcepub fn sub_table_count(&self) -> u16
pub fn sub_table_count(&self) -> u16
Number of subtables for this lookup
Sourcepub fn subtable_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn subtable_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to lookup subtables, from beginning of Lookup table
Sourcepub fn subtables(&self) -> ArrayOfOffsets<'a, T, Offset16>where
T: FontRead<'a>,
pub fn subtables(&self) -> ArrayOfOffsets<'a, T, Offset16>where
T: FontRead<'a>,
A dynamically resolving wrapper for subtable_offsets.
Sourcepub fn mark_filtering_set(&self) -> Option<u16>
pub fn mark_filtering_set(&self) -> Option<u16>
Index (base 0) into GDEF mark glyph sets structure. This field is only present if the USE_MARK_FILTERING_SET lookup flag is set.