fontdump/fontdump.rs
1//! Prints glyphs as ASCII so the font can be reviewed without a display.
2use denise_render::font;
3fn main() {
4 for line in std::env::args().skip(1) {
5 let mut rows = vec![String::new(); font::CELL_HEIGHT as usize];
6 for ch in line.chars() {
7 let g = font::BUILT_IN.glyph(ch);
8 for (i, row) in rows.iter_mut().enumerate() {
9 for x in 0..font::CELL_WIDTH {
10 row.push(if g[i] & (0x80 >> x) != 0 { '#' } else { '.' });
11 }
12 row.push('.');
13 }
14 }
15 for r in rows {
16 println!("{r}");
17 }
18 println!();
19 }
20}