pub struct SingleSubBuilder { /* private fields */ }Expand description
A builder for SingleSubst subtables.
Implementations§
Source§impl SingleSubBuilder
impl SingleSubBuilder
Sourcepub fn insert(&mut self, target: GlyphId16, replacement: GlyphId16)
pub fn insert(&mut self, target: GlyphId16, replacement: GlyphId16)
Add this replacement to the builder.
If there is an existing substitution for the provided target, it will be overwritten.
Sourcepub fn can_add(&self, target: GlyphId16, replacement: GlyphId16) -> bool
pub fn can_add(&self, target: GlyphId16, replacement: GlyphId16) -> bool
Returns true if all the pairs of items in the two iterators can be
added to this lookup.
The iterators are expected to be equal length.
Sourcepub fn iter_pairs(&self) -> impl Iterator<Item = (GlyphId16, GlyphId16)> + '_
👎Deprecated since 0.38.2: use ::iter instead
pub fn iter_pairs(&self) -> impl Iterator<Item = (GlyphId16, GlyphId16)> + '_
Iterate all the substitution pairs in this builder.
used when compiling the aalt feature.
Sourcepub fn iter(&self) -> impl Iterator<Item = (GlyphId16, GlyphId16)> + '_
pub fn iter(&self) -> impl Iterator<Item = (GlyphId16, GlyphId16)> + '_
Iterate all the substitution pairs in this builder.
Sourcepub fn promote_to_multi_sub(self) -> MultipleSubBuilder
pub fn promote_to_multi_sub(self) -> MultipleSubBuilder
Convert this SingleSubBuilder into a MultipleSubBuilder.
This is used by the fea compiler in some cases to reduce the number of generated lookups.
Sourcepub fn promote_to_ligature_sub(self) -> LigatureSubBuilder
pub fn promote_to_ligature_sub(self) -> LigatureSubBuilder
Convert this SingleSubBuilder into a LigatureSubBuilder.
This is used by the fea compiler in some cases to reduce the number of generated lookups.
Trait Implementations§
Source§impl Builder for SingleSubBuilder
impl Builder for SingleSubBuilder
Source§impl Clone for SingleSubBuilder
impl Clone for SingleSubBuilder
Source§fn clone(&self) -> SingleSubBuilder
fn clone(&self) -> SingleSubBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SingleSubBuilder
impl Debug for SingleSubBuilder
Source§impl Default for SingleSubBuilder
impl Default for SingleSubBuilder
Source§fn default() -> SingleSubBuilder
fn default() -> SingleSubBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SingleSubBuilder
impl RefUnwindSafe for SingleSubBuilder
impl Send for SingleSubBuilder
impl Sync for SingleSubBuilder
impl Unpin for SingleSubBuilder
impl UnwindSafe for SingleSubBuilder
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
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
Convert this type into
T, using the provided data to resolve any offsets.