pub struct VariationStoreBuilder { /* private fields */ }Expand description
A builder for the ItemVariationStore.
This handles assigning VariationIndex values to unique sets of deltas and grouping delta sets into ItemVariationData subtables.
Implementations§
Source§impl VariationStoreBuilder
impl VariationStoreBuilder
Sourcepub fn new(axis_count: u16) -> Self
pub fn new(axis_count: u16) -> Self
Create a builder that will optimize delta storage.
This is the general case. For HVAR, it is also possible to use the
glyph ids as implicit indices, which may be more efficient for some
data. To use implicit indices, use new_with_implicit_indices instead.
Sourcepub fn new_with_implicit_indices(axis_count: u16) -> Self
pub fn new_with_implicit_indices(axis_count: u16) -> Self
Create a builder that does not share deltas between entries.
This is used in HVAR, where it is possible to use glyph ids as the ‘inner index’, and to generate a single ItemVariationData subtable with one entry per item.
pub fn add_deltas<T: Into<i32>>( &mut self, deltas: Vec<(VariationRegion, T)>, ) -> u32
Sourcepub fn build(self) -> (ItemVariationStore, VariationIndexRemapping)
pub fn build(self) -> (ItemVariationStore, VariationIndexRemapping)
Build the ItemVariationStore table
This also returns a structure that can be used to remap the temporarily
assigned delta set Ids to their final VariationIndex values.
Trait Implementations§
Source§impl Clone for VariationStoreBuilder
impl Clone for VariationStoreBuilder
Source§fn clone(&self) -> VariationStoreBuilder
fn clone(&self) -> VariationStoreBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for VariationStoreBuilder
impl RefUnwindSafe for VariationStoreBuilder
impl Send for VariationStoreBuilder
impl Sync for VariationStoreBuilder
impl Unpin for VariationStoreBuilder
impl UnwindSafe for VariationStoreBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
T, using the provided data to resolve any offsets.