Skip to content

Commit 536e517

Browse files
committed
Record which font is being rendered
1 parent bd0349b commit 536e517

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/font/font16.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
3232
/// An 8x16 font
3333
pub static FONT: super::Font = super::Font {
34+
name: "8x16",
3435
height: 16,
3536
data: &DATA,
3637
};

src/font/font8.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
3434
/// An 8x16 font
3535
pub static FONT: super::Font = super::Font {
36+
name: "8x8",
3637
height: 8,
3738
data: &DATA,
3839
};

src/font/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pub mod font8;
3939

4040
/// A font
4141
pub struct Font<'a> {
42+
pub name: &'static str,
4243
pub height: usize,
4344
pub data: &'a [u8],
4445
}

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,12 @@ impl MyApp {
15561556
for glyph in 0..=255 {
15571557
for palette_entry in PALETTE.iter().take(Self::NUM_FG) {
15581558
let fg = RGBColour::from_packed(palette_entry.load(Ordering::Relaxed));
1559-
info!("Drawing {glyph} in {:06x}", fg.as_packed());
1559+
debug!(
1560+
"Drawing glyph {} from font {} in colour {:06x}",
1561+
glyph,
1562+
font.name,
1563+
fg.as_packed()
1564+
);
15601565
let texture_id = if texture_buffer.len() > slot {
15611566
texture_buffer[slot]
15621567
} else {

0 commit comments

Comments
 (0)