pub struct Subtable0<'a> {
data: FontData<'a>,
}Expand description
The type 0 kerx subtable.
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> Subtable0<'a>
impl<'a> Subtable0<'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 search_range(&self) -> u32
pub fn search_range(&self) -> u32
The largest power of two less than or equal to the value of nPairs, multiplied by the size in bytes of an entry in the subtable.
Sourcepub fn entry_selector(&self) -> u32
pub fn entry_selector(&self) -> u32
This is calculated as log2 of the largest power of two less than or equal to the value of nPairs. This value indicates how many iterations of the search loop have to be made. For example, in a list of eight items, there would be three iterations of the loop.
Sourcepub fn range_shift(&self) -> u32
pub fn range_shift(&self) -> u32
The value of nPairs minus the largest power of two less than or equal to nPairs. This is multiplied by the size in bytes of an entry in the table.
Sourcepub fn pairs(&self) -> &'a [Subtable0Pair]
pub fn pairs(&self) -> &'a [Subtable0Pair]
Kerning records.