pub struct Lookup4<'a> {
data: FontData<'a>,
}Expand description
Segment array format. A segment mapping is performed (as with Format 2), but instead of a single lookup value for all the glyphs in the segment, each glyph in the segment gets its own separate lookup value.
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> Lookup4<'a>
impl<'a> Lookup4<'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) -> u16
pub fn search_range(&self) -> u16
The value of unitSize times the largest power of 2 that is less than or equal to the value of nUnits.
Sourcepub fn entry_selector(&self) -> u16
pub fn entry_selector(&self) -> u16
The log base 2 of the largest power of 2 less than or equal to the value of nUnits.
Sourcepub fn range_shift(&self) -> u16
pub fn range_shift(&self) -> u16
The value of unitSize times the difference of the value of nUnits minus the largest power of 2 less than or equal to the value of nUnits.
Sourcepub fn segments(&self) -> &'a [LookupSegment4]
pub fn segments(&self) -> &'a [LookupSegment4]
Segments.