Struct gfx_glyph::GlyphInfo [] [src]

pub struct GlyphInfo<'a> {
    pub text: &'a str,
    pub screen_position: (f32, f32),
    pub bounds: (f32, f32),
    pub scale: Scale,
    // 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

Section text, use nfc_chars() instead in order to respect skip settings, ie in leftover payloads.

Position on screen to render text, in pixels from top-left.

Max (width, height) bounds, in pixels from top-left.

Font scale

Methods

impl<'a> GlyphInfo<'a>
[src]

Returns a unicode normalized char iterator.

Returns a new GlyphInfo instance whose nfc_chars() method will skip additional chars.

Trait Implementations

impl<'a> Debug for GlyphInfo<'a>
[src]

Formats the value using the given formatter.

impl<'a> Clone for GlyphInfo<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, 'b> From<&'b Section<'a>> for GlyphInfo<'a>
[src]

Performs the conversion.