Trait embedded_graphics::fonts::Font[][src]

pub trait Font<'a> {
    fn render_str(chars: &'a str, color: u8) -> Self;
}

Common methods for all fonts

Required Methods

Render a string in the implementing font's typeface.


fn main() {
    let disp = Display {};
    // Render a string with a 8bit color
    let text = Font6x8::render_str("Hello world", 1);  

    disp.draw(text.into_iter());
}

Implementors