https://github.com/althonos/embedded-picofont
The PICO-8 font to use with embedded-graphics.
https://github.com/althonos/embedded-picofont
embedded embedded-rust font graphics no-std pico-8 rust
Last synced: 3 months ago
JSON representation
The PICO-8 font to use with embedded-graphics.
- Host: GitHub
- URL: https://github.com/althonos/embedded-picofont
- Owner: althonos
- License: mit
- Created: 2019-07-02T21:05:33.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-16T04:26:14.000Z (about 4 years ago)
- Last Synced: 2025-03-25T12:22:24.663Z (3 months ago)
- Topics: embedded, embedded-rust, font, graphics, no-std, pico-8, rust
- Language: Rust
- Homepage:
- Size: 80.1 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING
Awesome Lists containing this project
README
# `embedded-picofont` [](https://github.com/althonos/embedded-picofont/stargazers)
*The PICO-8 font to use with [`embedded-graphics`](https://crates.io/crates/embedded-graphics).*
[](https://travis-ci.com/althonos/embedded-picofont/branches)
[](https://codecov.io/gh/althonos/embedded-picofont)
[](https://choosealicense.com/licenses/mit/)
[](https://github.com/althonos/embedded-picofont)
[](https://crates.io/crates/embedded-picofont)
[](https://docs.rs/embedded-picofont)
[](https://github.com/althonos/embedded-picofont/blob/master/CHANGELOG.md)
[](https://github.com/althonos/embedded-picofont/issues)## Overview
This crate provides the super tiny 4x6 font of the PICO-8 fantasy console as
an [`embedded_graphics::fonts::Font`](https://docs.rs/embedded-graphics/0.6.2/embedded_graphics/fonts/trait.Font.html):
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`](https://docs.rs/embedded-graphics/0.6.2/embedded_graphics/style/struct.TextStyle.html)
to attach the PICO-8 font to a text:
```rust
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:
```rust
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](https://docs.rs/embedded-graphics/)
for more information on how to use this crate.## License
* The [original PICO-8 font](https://www.lexaloffle.com/pico-8.php?page=faq)
is available under the [CC-0 license](https://creativecommons.org/share-your-work/public-domain/cc0/).
* This crate is released under the [MIT License](https://opensource.org/licenses/mit-license.php).