Trait embedded_graphics::mono_font::mapping::GlyphMapping

source ·
pub trait GlyphMapping {
    // Required method
    fn index(&self, c: char) -> usize;
}
Expand description

Mapping from characters to glyph indices.

Required Methods§

source

fn index(&self, c: char) -> usize

Maps a character to a glyph index.

If c isn’t included in the font the index of a suitable replacement glyph is returned.

Implementors§

source§

impl GlyphMapping for StrGlyphMapping<'_>

source§

impl<F> GlyphMapping for F
where F: Fn(char) -> usize,