Expand description

This crate provides bitmap fonts for the embedded-graphics crate without requiring generics. All fonts provided are concrete, constant instances of BitmapFont. This means you can use these bitmap fonts without any generics, unlike those fonts shipped with embedded-graphics where each font is implemented via its own struct. Also, this allows pixel-double fonts to share their bitmap data with the non-doubled font, reducing the flash size required.

Usage Example

use bitmap_font::{BitmapFont, WithFont, FONT_7x13};
use embedded_graphics::{fonts::Text, prelude::*};

let font: BitmapFont = FONT_7x13;
let text = Text::new("Hello World!", Point::zero());
text.with_font(font, BinaryColor::On).draw(&mut display)?;

Structs

Stores the font bitmap and some additional info for each font.

Constants

Tamzen 5x9 Font.

Tamzen 6x12 Font.

Tamzen 7x13 Font.

Tamzen 7x14 Font.

Tamzen 8x15 Font.

Tamzen 8x16 Font.

Pixel-double version of FONT_5x9.

Tamzen 10x20 Font.

Pixel-double version of FONT_6x12.

Pixel-double version of FONT_7x13.

Pixel-double version of FONT_7x14.

Pixel-double version of FONT_8x15.

Pixel-double version of FONT_8x16.

Pixel-double version of FONT_10x20.

Traits

Style a Text with a font and color.