Crates.io | embedded-picofont |
lib.rs | embedded-picofont |
version | 0.2.1 |
source | src |
created_at | 2019-07-03 01:14:55.704043 |
updated_at | 2020-11-27 22:26:20.463606 |
description | The PICO-8 font to use with embedded-graphics |
homepage | https://github.com/althonos/embedded-picofont |
repository | https://github.com/althonos/embedded-picofont |
max_upload_size | |
id | 145541 |
size | 52,170 |
embedded-picofont
The PICO-8 font to use with embedded-graphics
.
This crate provides the super tiny 4x6 font of the PICO-8 fantasy console as
an embedded_graphics::fonts::Font
:
Please note the PICO-8 itself only use the uppercase characters, as the lowercase chars can get really hard to read if the display is not upscaled. As such, it is advised to only use this font to display uppercase characters.
Use TextStyle
to attach the PICO-8 font to a text:
use embedded_picofont::FontPico;
let text = Text::new("Hello world!", Point::new(0, 0))
.into_styled(TextStyle::new(FontPico, Gray8::WHITE));
The PICO-8 also has wide characters: these can be displayed using two smaller
characters in the 128..255
char range:
use embedded_picofont::{text_pico, FontPico};
let text = Text::new("PRESS \u{96}\u{97} TO GO BACK", Point::new(0, 0))
.into_styled(TextStyle::new(FontPico, Gray8::WHITE));
See the embedded-graphics
documentation
for more information on how to use this crate.