| Crates.io | u8g2-fonts |
| lib.rs | u8g2-fonts |
| version | 0.7.1 |
| created_at | 2022-08-26 16:00:35.742274+00 |
| updated_at | 2025-06-22 07:11:32.133706+00 |
| description | A text renderer for embedded-graphics, based on U8g2. |
| homepage | |
| repository | https://github.com/Finomnis/u8g2-fonts |
| max_upload_size | |
| id | 652868 |
| size | 13,856,047 |
This crate is a pure Rust reimplementation of the font subsystem of U8g2.
It is intended for the embedded-graphics ecosystem.
While this crate is MIT / Apache-2.0 licensed, note that the fonts themselves are not.
For more information about the font licenses, read the license agreement of U8g2.
let font = FontRenderer::new::<fonts::u8g2_font_haxrcorp4089_t_cyrillic>();
let text = "embedded-graphics";
font.render_aligned(
text,
display.bounding_box().center() + Point::new(0, 16),
VerticalPosition::Baseline,
HorizontalAlignment::Center,
FontColor::Transparent(BinaryColor::On),
&mut display,
)
.unwrap();
This example is based on the hello-world of the official embedded-graphics examples.
If we replace the text rendering section of the example with the code above, it produces this output:

Note that the letter i sits snug in between the h and the c, compared to the original example. This is not a monospace font.