Skip to content

peckpeck/embedded-ttf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)?;

About

TrueType font rendering with embedded-graphics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages