Trait glyph_brush_layout::GlyphPositioner[][src]

pub trait GlyphPositioner: Hash {
    fn calculate_glyphs<'font, F: FontMap<'font>>(
        &self,
        _: &F,
        geometry: &SectionGeometry,
        sections: &[SectionText]
    ) -> Vec<(PositionedGlyph<'font>, Color, FontId)>;
fn bounds_rect(&self, geometry: &SectionGeometry) -> Rect<f32>; }

Logic to calculate glyph positioning using Font, SectionGeometry and SectionText.

Required Methods

Important traits for Vec<u8>

Calculate a sequence of positioned glyphs to render. Custom implementations should return the same result when called with the same arguments to allow layout caching.

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

Implementors