pub struct UvsSubtable<'a> {
data: FontData<'a>,
selectors: &'a [VariationSelector],
format: u16,
}Expand description
A Unicode variation sequences subtable: format 14, or format 15, whose non-default mappings carry 24-bit glyph IDs.
Fields§
§data: FontData<'a>§selectors: &'a [VariationSelector]§format: u16Implementations§
Source§impl<'a> UvsSubtable<'a>
impl<'a> UvsSubtable<'a>
Sourcepub fn var_selector(&self) -> &'a [VariationSelector]
pub fn var_selector(&self) -> &'a [VariationSelector]
The variation selector records, sorted by selector.
Sourcepub fn map_variant(
&self,
codepoint: impl Into<u32>,
selector: impl Into<u32>,
) -> Option<MapVariant>
pub fn map_variant( &self, codepoint: impl Into<u32>, selector: impl Into<u32>, ) -> Option<MapVariant>
Maps a codepoint and variation selector to a nominal glyph identifier.
Sourcepub fn iter(&self) -> UvsSubtableIter<'a> ⓘ
pub fn iter(&self) -> UvsSubtableIter<'a> ⓘ
Returns an iterator over all (codepoint, selector, mapping variant) triples in the subtable.
Malicious and malformed fonts can produce a large number of invalid
triples. Use Self::iter_with_limits to generate a pruned sequence
that is limited to reasonable values.
Sourcepub fn iter_with_limits(&self, limits: CmapIterLimits) -> UvsSubtableIter<'a> ⓘ
pub fn iter_with_limits(&self, limits: CmapIterLimits) -> UvsSubtableIter<'a> ⓘ
Returns an iterator over all (codepoint, selector, mapping variant) triples in the subtable within the given limits.
pub fn closure_glyphs( &self, unicodes: &IntSet<u32>, glyph_set: &mut IntSet<GlyphId>, )
Sourcefn non_default_uvs(
&self,
record: &VariationSelector,
) -> Option<NonDefaultUvsIter<'a>>
fn non_default_uvs( &self, record: &VariationSelector, ) -> Option<NonDefaultUvsIter<'a>>
The non-default mappings of a selector record, if present and readable.
Trait Implementations§
Source§impl<'a> Clone for UvsSubtable<'a>
impl<'a> Clone for UvsSubtable<'a>
Source§fn clone(&self) -> UvsSubtable<'a>
fn clone(&self) -> UvsSubtable<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> From<Cmap14<'a>> for UvsSubtable<'a>
impl<'a> From<Cmap14<'a>> for UvsSubtable<'a>
Auto Trait Implementations§
impl<'a> Freeze for UvsSubtable<'a>
impl<'a> RefUnwindSafe for UvsSubtable<'a>
impl<'a> Send for UvsSubtable<'a>
impl<'a> Sync for UvsSubtable<'a>
impl<'a> Unpin for UvsSubtable<'a>
impl<'a> UnsafeUnpin for UvsSubtable<'a>
impl<'a> UnwindSafe for UvsSubtable<'a>
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