pub struct Subtable<'a> { /* private fields */ }Expand description
A subtable in a mort chain.
Implementations§
Source§impl<'a> Subtable<'a>
impl<'a> Subtable<'a>
pub const MIN_SIZE: usize
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a, Args = ()>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a, Args = ()>>( &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
just use the base type directly
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 sub_feature_flags(&self) -> u32
pub fn sub_feature_flags(&self) -> u32
The 32-bit mask identifying which subtable this is.
pub fn length_byte_range(&self) -> Range<usize> ⓘ
pub fn coverage_byte_range(&self) -> Range<usize> ⓘ
pub fn sub_feature_flags_byte_range(&self) -> Range<usize> ⓘ
pub fn data_byte_range(&self) -> Range<usize> ⓘ
Source§impl<'a> Subtable<'a>
impl<'a> Subtable<'a>
Sourcepub fn is_logical(&self) -> bool
pub fn is_logical(&self) -> bool
If true, this subtable will process glyphs in logical order.
Sourcepub fn is_all_directions(&self) -> bool
pub fn is_all_directions(&self) -> bool
If true, this subtable applies to horizontal and vertical text.
Sourcepub fn is_backwards(&self) -> bool
pub fn is_backwards(&self) -> bool
If true, this subtable processes glyphs in descending order.
Sourcepub fn is_vertical(&self) -> bool
pub fn is_vertical(&self) -> bool
If true, this subtable applies only to vertical text.
Sourcepub fn kind(&self) -> Result<SubtableKind<'a>, ReadError>
pub fn kind(&self) -> Result<SubtableKind<'a>, ReadError>
Returns the format-specific subtable data.