Trait gfx_glyph::GlyphPositioner [] [src]

pub trait GlyphPositioner: Hash {
    fn calculate_glyphs<'a, 'font, G>(
        &self,
        font: &HashMap<FontId, Font<'font>>,
        section: G
    ) -> Vec<GlyphedSectionText<'font>>
    where
        G: Into<SectionGlyphInfo<'a>>
;
fn bounds_rect<'a, G>(&self, section: G) -> Rect<f32>
    where
        G: Into<SectionGlyphInfo<'a>>
; }

Logic to calculate glyph positioning based on Font and GlyphInfo

Required Methods

Calculate a sequence of positioned glyphs to render. Custom implementations should always return the same result when called with the same arguments. If not consider disabling cache_glyph_positioning.

Return a rectangle according to the requested render position and bounds appropriate for the glyph layout.

Implementors