pub struct Mvar<'a> {
data: FontData<'a>,
}Expand description
The MVAR (Metrics Variations) table
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> Mvar<'a>
impl<'a> Mvar<'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 horizontal metrics variations table — set to 1. Minor version number of the horizontal metrics variations table — set to 0.
Sourcepub fn value_record_size(&self) -> u16
pub fn value_record_size(&self) -> u16
The size in bytes of each value record — must be greater than zero.
Sourcepub fn value_record_count(&self) -> u16
pub fn value_record_count(&self) -> u16
The number of value records — may be zero.
Sourcepub fn item_variation_store_offset(&self) -> Nullable<Offset16>
pub fn item_variation_store_offset(&self) -> Nullable<Offset16>
Offset in bytes from the start of this table to the item variation store table. If valueRecordCount is zero, set to zero; if valueRecordCount is greater than zero, must be greater than zero.
Sourcepub fn item_variation_store(
&self,
) -> Option<Result<ItemVariationStore<'a>, ReadError>>
pub fn item_variation_store( &self, ) -> Option<Result<ItemVariationStore<'a>, ReadError>>
Attempt to resolve item_variation_store_offset.
Sourcepub fn value_records(&self) -> &'a [ValueRecord]
pub fn value_records(&self) -> &'a [ValueRecord]
Array of value records that identify target items and the associated delta-set index for each. The valueTag records must be in binary order of their valueTag field.