pub type Cmap4<'a> = TableRef<'a, Cmap4Marker>;
Expand description
cmap Format 4: Segment mapping to delta values
Aliased Type§
struct Cmap4<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Cmap4<'a>
impl<'a> Cmap4<'a>
Sourcepub fn language(&self) -> u16
pub fn language(&self) -> u16
For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.
Sourcepub fn seg_count_x2(&self) -> u16
pub fn seg_count_x2(&self) -> u16
2 × segCount.
Sourcepub fn search_range(&self) -> u16
pub fn search_range(&self) -> u16
Maximum power of 2 less than or equal to segCount, times 2 ((2floor(log2(segCount))) * 2, where “” is an exponentiation operator)
Sourcepub fn entry_selector(&self) -> u16
pub fn entry_selector(&self) -> u16
Log2 of the maximum power of 2 less than or equal to numTables (log2(searchRange/2), which is equal to floor(log2(segCount)))
Sourcepub fn range_shift(&self) -> u16
pub fn range_shift(&self) -> u16
segCount times 2, minus searchRange ((segCount * 2) - searchRange)
Sourcepub fn end_code(&self) -> &'a [BigEndian<u16>]
pub fn end_code(&self) -> &'a [BigEndian<u16>]
End characterCode for each segment, last=0xFFFF.
Sourcepub fn start_code(&self) -> &'a [BigEndian<u16>]
pub fn start_code(&self) -> &'a [BigEndian<u16>]
Start character code for each segment.
Sourcepub fn id_range_offsets(&self) -> &'a [BigEndian<u16>]
pub fn id_range_offsets(&self) -> &'a [BigEndian<u16>]
Offsets into glyphIdArray or 0
Sourcepub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]
pub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]
Glyph index array (arbitrary length)
Source§impl<'a, T> TableRef<'a, T>
impl<'a, T> TableRef<'a, T>
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.