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§
- The 7 point size with a character size of 5x10 pixels.
- The 9 point size with a character size of 6x11 pixels.
- The 10 point size with a character size of 6x12 pixels.
- The 12 point size with a character size of 7x15 pixels.
- The 14 point size with a character size of 10x17 pixels.
- The 18 point size with a character size of 12x22 pixels.
- The 24 point size with a character size of 16x29 pixels.