embedded-ttf

Crates.ioembedded-ttf
lib.rsembedded-ttf
version0.2.2
created_at2025-08-24 12:47:31.001254+00
updated_at2025-08-26 14:50:05.47989+00
descriptionFont rendering (ttf and otf) with embedded-graphics
homepage
repositoryhttps://github.com/peckpeck/embedded-ttf
max_upload_size
id1808300
size189,622
(peckpeck)

documentation

https://docs.rs/embedded-ttf

README

crates.io docs.rs Crates.io License

Embedded TTF rendering

Font rendering (ttf and otf) for embedded-graphics (no_std).

Notable dependencies

Ho to use

let mut display: SimulatorDisplay<Rgb565> = SimulatorDisplay::new(Size::new(350, 200));

let style = FontTextStyleBuilder::new(
    Font::try_from_bytes(include_bytes!("../assets/Roboto-Regular.ttf")).unwrap())
    .font_size(16)
    .text_color(Rgb565::WHITE)
    .build();

Text::new("Hello World!", Point::new(15, 30), style).draw(&mut display)?;
Commit count: 11

cargo fmt