Struct gfx_glyph::GlyphInfo
[−]
[src]
pub struct GlyphInfo<'a> { pub text: &'a str, pub scale: Scale, pub color: [f32; 4], pub font_id: FontId, // some fields omitted }
A specialised view on a Section
for the purposes of calculating
glyph positions. Used by a GlyphPositioner
.
See Layout
for built-in positioner logic.
Fields
text: &'a str
Section text, use remaining_chars()
instead in order to respect skip settings, ie in leftover payloads.
scale: Scale
color: [f32; 4]
font_id: FontId
Methods
impl<'a> GlyphInfo<'a>
[src]
fn remaining_chars(&self) -> Skip<Recompositions<Chars<'a>>>
[src]
Returns a unicode normalized char iterator, that respects the skipped chars that have already been already processed
fn skip(&self, skip: usize) -> GlyphInfo<'a>
[src]
Returns a new GlyphInfo instance whose
remaining_chars()
method will skip additional chars.
fn substring(&self) -> &'a str
[src]
Returns a substring reference according the current skip value
Trait Implementations
impl<'a> Debug for GlyphInfo<'a>
[src]
impl<'a> Clone for GlyphInfo<'a>
[src]
fn clone(&self) -> GlyphInfo<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Copy for GlyphInfo<'a>
[src]
impl<'a> From<SectionText<'a>> for GlyphInfo<'a>
[src]
fn from(section: SectionText<'a>) -> Self
[src]
Performs the conversion.