Crate profont

source ·
Expand description

The ProFont monospace programming font for use with embedded-graphics. Font data taken from the ProFont homepage.

§Examples

Draw the text “Hello world” to a mock display using the 7pt ProFont font.

use embedded_graphics::{
    mock_display::MockDisplay,
    mono_font::MonoTextStyle,
    pixelcolor::Rgb888,
    prelude::*,
    text::Text,
};
use profont::PROFONT_7_POINT;

let mut display = MockDisplay::new();

let text_style = MonoTextStyle::new(&PROFONT_7_POINT, Rgb888::RED);

Text::new("Hello world", Point::new(0, 7), text_style).draw(&mut display)?;

For a more complete example see the example in the ssd1675 crate.

§Glyph Coverage

This crate provides support for ISO/IEC 8859-1 (latin1), although do note that the font is missing a few glyphs in this range.

Constants§