From cd4f4ebb6bae9e7b7d8ffb334d0ea1c8c90978f0 Mon Sep 17 00:00:00 2001 From: memdmp Date: Sun, 12 Jan 2025 04:02:27 +0100 Subject: feat: describe the font's pattern --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 0f51f4e..3d9c225 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,8 +30,8 @@ pub fn main() { let mut i = 0; 'running: loop { i = (i + 1) % 255; - - canvas.set_draw_color(Color::RGB(255, 255, 255)); + + canvas.set_draw_color(Color::RGB(12, 12, 12)); canvas.clear(); let mut offset: f32 = 0.0; @@ -43,13 +43,13 @@ pub fn main() { .to_texture(&texture_creator, Color::RGB(i, 64, 255 - i)) .unwrap(), None, - char.to_rect(offset as i32, 0), + char.to_rect(offset as i32 + 16, 16), ) .unwrap(); offset += char.advance_width; } offset = 0.0; - for c in "All hail Blahaj".chars() { + for c in "Cum 2 Cosin25 :3".chars() { let char = FONT_GALMURI.get_char(c); canvas .copy( @@ -57,7 +57,7 @@ pub fn main() { .to_texture(&texture_creator, Color::RGB(i, 64, 255 - i)) .unwrap(), None, - char.to_rect(offset as i32, 40), + char.to_rect(offset as i32 + 18, 16+36), ) .unwrap(); offset += char.advance_width; -- cgit v1.2.3