IBM437
The IBM437 bitmap font, extracted from the original AM9264 chip (MDA/CGA card), for Rust projects.
Two rendering backends are available, selected via Cargo features:
embedded-graphics-backend— providesMonoFontconstants for the embedded-graphics ecosystem. Ideal for embedded or simulated displays.framebuffer— renders text into any&mut [u32]ARGB pixel buffer. Works with minifb, softbuffer, SDL2, or any raw framebuffer.
Both backends can be enabled simultaneously. The raw font data and the Unicode → IBM437 mapping are always available regardless of backend choice.
Available fonts
Three variants can be toggled individually via features (regular8x8, bold8x8, regular9x14). All three are enabled by default.
8×8 regular

8×8 bold

9×14 regular

Usage with embedded-graphics
This is the default configuration — no extra feature flags needed.
[]
= "0.4"
use ;
use IBM437_8X8_REGULAR;
let style = new;
new
.draw?;
Usage with minifb / softbuffer / raw framebuffers
[]
= { = "0.4", = false, = ["framebuffer", "regular8x8"] }
use FbFont;
let font = regular_8x8;
let mut buffer = vec!;
// Draw with yellow foreground, transparent background
font.draw_str;
// Draw with white on blue
font.draw_str;
A complete minifb example is available in examples/minifb_hello.rs.
Feature reference
| Feature | Default | Description |
|---|---|---|
embedded-graphics-backend |
✓ | MonoFont constants for embedded-graphics |
framebuffer |
FbFont renderer for &mut [u32] buffers |
|
regular8x8 |
✓ | Include the 8×8 regular font |
bold8x8 |
✓ | Include the 8×8 bold font |
regular9x14 |
✓ | Include the 9×14 regular font |
generate |
Binary to regenerate fonts from the ROM dump |
Character set
Glyph offsets are optimised for UTF-8: most Latin-1 characters map to their Unicode code point. The full mapping is available in doc/Characters.txt.
License
MIT