pub struct Avar<'a> {
data: FontData<'a>,
}Expand description
The avar (Axis Variations) table
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> Avar<'a>
impl<'a> Avar<'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 version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major version number of the axis variations table — set to 1 or 2. Minor version number of the axis variations table — set to 0.
Sourcepub fn axis_count(&self) -> u16
pub fn axis_count(&self) -> u16
The number of variation axes for this font. This must be the same number as axisCount in the ‘fvar’ table.
Sourcepub fn axis_segment_maps(&self) -> VarLenArray<'a, SegmentMaps<'a>>
pub fn axis_segment_maps(&self) -> VarLenArray<'a, SegmentMaps<'a>>
The segment maps array — one segment map for each axis, in the order of axes specified in the ‘fvar’ table.
Sourcepub fn axis_index_map_offset(&self) -> Option<Nullable<Offset32>>
pub fn axis_index_map_offset(&self) -> Option<Nullable<Offset32>>
Offset to DeltaSetIndexMap table (may be NULL).
Sourcepub fn axis_index_map(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn axis_index_map(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve axis_index_map_offset.
Sourcepub fn var_store_offset(&self) -> Option<Nullable<Offset32>>
pub fn var_store_offset(&self) -> Option<Nullable<Offset32>>
Offset to ItemVariationStore (may be NULL).
Sourcepub fn var_store(&self) -> Option<Result<ItemVariationStore<'a>, ReadError>>
pub fn var_store(&self) -> Option<Result<ItemVariationStore<'a>, ReadError>>
Attempt to resolve var_store_offset.