pub struct ItemVariationData<'a> {
data: FontData<'a>,
}Expand description
The ItemVariationData subtable
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> ItemVariationData<'a>
impl<'a> ItemVariationData<'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 item_count(&self) -> u16
pub fn item_count(&self) -> u16
The number of delta sets for distinct items.
Sourcepub fn word_delta_count(&self) -> u16
pub fn word_delta_count(&self) -> u16
A packed field: the high bit is a flag—see details below.
Sourcepub fn region_index_count(&self) -> u16
pub fn region_index_count(&self) -> u16
The number of variation regions referenced.
Sourcepub fn region_indexes(&self) -> &'a [BigEndian<u16>]
pub fn region_indexes(&self) -> &'a [BigEndian<u16>]
Array of indices into the variation region list for the regions referenced by this item variation data table.
Sourcepub fn delta_sets(&self) -> &'a [u8] ⓘ
pub fn delta_sets(&self) -> &'a [u8] ⓘ
Delta-set rows.
pub fn item_count_byte_range(&self) -> Range<usize> ⓘ
pub fn word_delta_count_byte_range(&self) -> Range<usize> ⓘ
pub fn region_index_count_byte_range(&self) -> Range<usize> ⓘ
pub fn region_indexes_byte_range(&self) -> Range<usize> ⓘ
pub fn delta_sets_byte_range(&self) -> Range<usize> ⓘ
Source§impl<'a> ItemVariationData<'a>
impl<'a> ItemVariationData<'a>
Sourcepub fn delta_set(
&self,
inner_index: u16,
) -> impl Iterator<Item = i32> + 'a + Clone
pub fn delta_set( &self, inner_index: u16, ) -> impl Iterator<Item = i32> + 'a + Clone
Returns an iterator over the per-region delta values for the specified inner index.
pub fn get_delta_row_len(&self) -> usize
Sourcepub fn delta_row_len(word_delta_count: u16, region_index_count: u16) -> usize
pub fn delta_row_len(word_delta_count: u16, region_index_count: u16) -> usize
the length of one delta set
pub fn delta_sets_len( item_count: u16, word_delta_count: u16, region_index_count: u16, ) -> usize
Trait Implementations§
Source§impl<'a> Clone for ItemVariationData<'a>
impl<'a> Clone for ItemVariationData<'a>
Source§fn clone(&self) -> ItemVariationData<'a>
fn clone(&self) -> ItemVariationData<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more