Trait embedded_graphics::fonts::Font [−][src]
pub trait Font<'a, C> where
C: PixelColor, { fn render_str(chars: &'a str, color: C) -> Self; }
Common methods for all fonts
Required Methods
fn render_str(chars: &'a str, color: C) -> Self
Render a string in the implementing font's typeface.
fn main() { let disp: Display = Display {}; // Render a string with a 8bit color let text = Font6x8::render_str("Hello world", 1u8.into()); disp.draw(text.into_iter()); }
Implementors
impl<'a, C> Font<'a, C> for Font12x16<'a, C> where
C: PixelColor,impl<'a, C> Font<'a, C> for Font6x12<'a, C> where
C: PixelColor,impl<'a, C> Font<'a, C> for Font6x8<'a, C> where
C: PixelColor,impl<'a, C> Font<'a, C> for Font8x16<'a, C> where
C: PixelColor,