Crate embedded_picofont

Source
Expand description

The PICO-8 font to use with embedded-graphics.

TravisCI Codecov License Source Crate Documentation Changelog GitHub issues

§Overview

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.

§Usage

Use TextStyle to attach the PICO-8 font to a text:

use embedded_graphics::prelude::*;
use embedded_graphics::fonts::Text;
use embedded_graphics::pixelcolor::Gray8;
use embedded_graphics::style::TextStyle;
use embedded_picofont::FontPico;

let text = Text::new("Hello world!", Point::new(0, 0))
    .into_styled(TextStyle::new(FontPico, Gray8::WHITE));

Hello world

The PICO-8 also has wide characters: these can be displayed using two smaller characters in the 128..255 char range:


let text = Text::new("PRESS \u{96}\u{97} TO GO BACK", Point::new(0, 0))
    .into_styled(TextStyle::new(FontPico, Gray8::WHITE));

Press left to go back

See the embedded-graphics documentation for more information on how to use this crate.

§License

Structs§

  • The 4x6 pixel monospace font used by the PICO-fantasy 8 console.