Struct zng_ext_font::ColorGlyphs
source · pub struct ColorGlyphs { /* private fields */ }
Expand description
COLR table.
The color glyphs for a font are available in FontFace::color_glyphs
.
Implementations§
source§impl ColorGlyphs
impl ColorGlyphs
sourcepub fn glyph(&self, base_glyph: GlyphIndex) -> Option<ColorGlyph<'_>>
pub fn glyph(&self, base_glyph: GlyphIndex) -> Option<ColorGlyph<'_>>
Iterate over color glyphs that replace the base_glyph
to render in color.
The base_glyph
is the glyph selected by the font during shaping.
Returns an iterator that renders an Emoji by overlaying colored glyphs, from the back (first item)
to the front (last item). Paired with each glyph is an index in the font’s ColorPalette::colors
or
None
if the base text color must be used.
Yields the base_glyph
with no palette color if the font does not provide colored replacements for it.
Trait Implementations§
source§impl Clone for ColorGlyphs
impl Clone for ColorGlyphs
source§fn clone(&self) -> ColorGlyphs
fn clone(&self) -> ColorGlyphs
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for ColorGlyphs
impl RefUnwindSafe for ColorGlyphs
impl Send for ColorGlyphs
impl Sync for ColorGlyphs
impl Unpin for ColorGlyphs
impl UnwindSafe for ColorGlyphs
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more