pub struct Subtable<'a> {
data: FontData<'a>,
}Expand description
A subtable in a morx chain.
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> Subtable<'a>
impl<'a> Subtable<'a>
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 sub_feature_flags(&self) -> u32
pub fn sub_feature_flags(&self) -> u32
The 32-bit mask identifying which subtable this is (the subtable being executed if the AND of this value and the processed defaultFlags is nonzero).
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 (or reverse logical order, depending on the value of bit 0x80000000).
Sourcepub fn is_all_directions(&self) -> bool
pub fn is_all_directions(&self) -> bool
If true, this subtable will be applied to both horizontal and vertical text (i.e. the state of bit 0x80000000 is ignored).
Sourcepub fn is_backwards(&self) -> bool
pub fn is_backwards(&self) -> bool
If true, this subtable will process glyphs in descending order. Otherwise, it will process the glyphs in ascending order.
Sourcepub fn is_vertical(&self) -> bool
pub fn is_vertical(&self) -> bool
If true, this subtable will only be applied to vertical text. Otherwise, this subtable will only be applied to horizontal text.
Sourcepub fn kind(&self) -> Result<SubtableKind<'a>, ReadError>
pub fn kind(&self) -> Result<SubtableKind<'a>, ReadError>
Returns an enum representing the actual subtable data.