Add bitmap font rendering via PNG tilesheet

Replace egui text rendering with a BitmapFont system:
- Glyph.tile: u32 replaces ch: char; top-left pixel of PNG is background sentinel
- BitmapFont loads/preprocesses PNG to opaque-white + transparent, tinted at render time
- Default font: assets/vga-font-8x16.png (CP437, 8×16 tiles); placeholder generated if missing
- Boards can specify a per-board font via [font] in their .toml file
- Editor Board tab: "Font…" button opens font dialog (rfd file picker, tile dims, tilesheet preview)
- Glyph picker: tile grid from active font replaces hardcoded ASCII char grid
- map_file: TileIndex untagged enum accepts char or integer in palette entries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-19 00:07:04 -05:00
parent 12ebe77932
commit 212297ecf9
14 changed files with 1174 additions and 260 deletions
+3 -3
View File
@@ -5,9 +5,9 @@ height = 25
player_start = [30, 12]
[palette]
" " = { archetype = "empty", ch = " ", fg = "#000000", bg = "#000000" }
"#" = { archetype = "wall", ch = "#", fg = "#808080", bg = "#606060" }
"+" = { archetype = "banana", ch = "#", fg = "#808080", bg = "#606060" }
" " = { archetype = "empty", tile = " ", fg = "#000000", bg = "#000000" }
"#" = { archetype = "wall", tile = "#", fg = "#808080", bg = "#606060" }
"+" = { archetype = "banana", tile = "#", fg = "#808080", bg = "#606060" }
[grid]
content = """