Crates.io | minitype-cli |
lib.rs | minitype-cli |
version | 0.0.1 |
created_at | 2025-08-22 16:48:49.902904+00 |
updated_at | 2025-08-22 16:48:49.902904+00 |
description | CLI for MiniType font conversion — a tiny, efficient bitmap font format for embedded_graphics |
homepage | https://github.com/dempfi/minitype |
repository | https://github.com/dempfi/minitype |
max_upload_size | |
id | 1806598 |
size | 81,748 |
MiniType is a tiny, fast bitmap font format for embedded devices.
Pixel fonts work great on microcontrollers: simple, efficient, and charmingly blocky. But sometimes you want text that looks a little smoother — without needing a desktop-class GPU. MiniType is here to bridge that gap.
With MiniType you can take whatever typeface — serifs, sans, handwritten, decorative — and make them actually run on microcontrollers. Pixel fonts will always be great, but some things they simply cannot capture: thin serifs, cursive strokes, playful handwriting styles. MiniType lets you bring those subtleties to even the humblest MCU displays.
By pre-blending antialiased glyphs using Servo's advanced WebRenderer, compressing the data, and keeping decoding O(1), MiniType lets you get crisp, modern-looking text while still fitting into the tight shoes of MCU hardware. It won’t make your OLED suddenly 4K, but it can make “Hello, world” look less like “HELLO, WORLD.” 😉
For alpha compositing, MiniType relies on embedded_rgba that handles alpha and fast buffered rendering.
Key benefits:
MiniType offers a smoother option when readability matters. Think of it as pixel fonts with a nice haircut: same efficiency, a bit more polish.
Here are some common and uncommon styles and how they translate with MiniType. You can download some of them from samples. And produce rest with one terminal command.
cargo install minitype
minitype --ttf ./SF-Compact-Rounded-Medium.otf --size 13 -o ./assets/sf_13.mtf
use minitype::{MiniTypeFont, MiniTextStyle};
use embedded_rgba::*;
const SF_13: MiniTypeFont = MiniTypeFont::raw(include_bytes!("./assets/sf_13.mtf"));
let text_style = MiniTextStyle::new(&SF_13, Rgb565::WHITE);
Text::with_alignment("Hello, world!", Point::new(10, 10), text_style, Alignment::Left)
.draw(&mut canvas.alpha())
.unwrap();