#embedded-graphics #text-renderer

no-std u8g2-fonts

A text renderer for embedded-graphics, based on U8g2

12 releases (6 breaking)

0.7.2 Sep 27, 2025
0.7.1 Jun 22, 2025
0.6.0 Mar 1, 2025
0.5.1 Dec 11, 2024
0.2.0 Sep 7, 2022

#141 in Embedded development

Download history 171/week @ 2025-10-03 272/week @ 2025-10-10 480/week @ 2025-10-17 434/week @ 2025-10-24 258/week @ 2025-10-31 446/week @ 2025-11-07 534/week @ 2025-11-14 432/week @ 2025-11-21 344/week @ 2025-11-28 360/week @ 2025-12-05 634/week @ 2025-12-12 158/week @ 2025-12-19 280/week @ 2025-12-26 453/week @ 2026-01-02 723/week @ 2026-01-09 591/week @ 2026-01-16

2,066 downloads per month
Used in 4 crates

Custom license

9MB
4K SLoC

u8g2-fonts

Hello World text rendered by this crate

Crates.io Crates.io License Build Status docs.rs Coverage Status

This crate is a pure Rust reimplementation of the font subsystem of U8g2.

It is intended for the embedded-graphics ecosystem.

Licensing

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.

Example

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:

Embedded-graphics example with our U8g2 font

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.

Dependencies