Struct write_fonts::tables::mvar::Mvar
source · pub struct Mvar {
pub version: MajorMinor,
pub value_record_size: u16,
pub value_record_count: u16,
pub item_variation_store: NullableOffsetMarker<ItemVariationStore>,
pub value_records: Vec<ValueRecord>,
}Expand description
The MVAR (Metrics Variations) table
Fields§
§version: MajorMinorMajor version number of the horizontal metrics variations table — set to 1. Minor version number of the horizontal metrics variations table — set to 0.
value_record_size: u16The size in bytes of each value record — must be greater than zero.
value_record_count: u16The number of value records — may be zero.
item_variation_store: NullableOffsetMarker<ItemVariationStore>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.
value_records: Vec<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.
Implementations§
source§impl Mvar
impl Mvar
sourcepub fn new(
version: MajorMinor,
item_variation_store: Option<ItemVariationStore>,
value_records: Vec<ValueRecord>
) -> Self
pub fn new( version: MajorMinor, item_variation_store: Option<ItemVariationStore>, value_records: Vec<ValueRecord> ) -> Self
Construct a new MVAR table.
Trait Implementations§
source§impl FontWrite for Mvar
impl FontWrite for Mvar
source§fn write_into(&self, writer: &mut TableWriter)
fn write_into(&self, writer: &mut TableWriter)
Write our data and information about offsets into this TableWriter.
source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
The type of this table. Read more
source§impl Ord for Mvar
impl Ord for Mvar
source§impl PartialEq for Mvar
impl PartialEq for Mvar
source§impl PartialOrd for Mvar
impl PartialOrd for Mvar
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Validate for Mvar
impl Validate for Mvar
source§fn validate_impl(&self, ctx: &mut ValidationCtx)
fn validate_impl(&self, ctx: &mut ValidationCtx)
Validate this table. Read more
impl Eq for Mvar
impl StructuralEq for Mvar
impl StructuralPartialEq for Mvar
Auto Trait Implementations§
impl RefUnwindSafe for Mvar
impl Send for Mvar
impl Sync for Mvar
impl Unpin for Mvar
impl UnwindSafe for Mvar
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
impl<'a, T> FontReadWithArgs<'a> for Twhere
T: FontRead<'a>,
source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.