From f12e249c73f021d57d69d5f93d27e03259982edf Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Sat, 15 Feb 2025 01:46:19 +0100 Subject: feat: Marquee, Lower dither opacity at top, DVD Logo should be separate function, Release Builds should work, advance_width should be f64 to save bytes, Vendor Micromod-RS, Add Timing Steps --- build.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'build.rs') diff --git a/build.rs b/build.rs index 9292e1e..438cde8 100644 --- a/build.rs +++ b/build.rs @@ -51,7 +51,7 @@ impl FontMetadata { ); image[0] = (width & 0b0000_0000_1111_1111) as u8; - image[1] = (width & 0b1111_1111_0000_0000 << 8) as u8; + image[1] = (width & (0b1111_1111_0000_0000 << 8)) as u8; if (image[0] as u16) | (image[1] as u16 >> 8) != width as u16 { panic!("Width missmatch!"); } @@ -78,7 +78,7 @@ impl FontMetadata { if i >= 0 { if i as u16 == width { i = 0; - image2.push('\n' as u8); + image2.push(b'\n'); } let v = format!("{:x?}", bit); let v = if v.len() == 1 { format!("0{}", v) } else { v }; @@ -178,11 +178,9 @@ pub const FONT{}: {name}Struct = {name}Struct{{ fn main() -> Result<(), Box> { fs::create_dir_all("src/generated")?; - let mut modrs = format!( - "// Copyright is a sham this is a @generated file. + let mut modrs = "// Copyright is a sham this is a @generated file. use crate::font::BakedFont; -" - ); +".to_string(); let fonts = [ FontMetadata { name: "Galmuri", @@ -205,6 +203,6 @@ use crate::font::BakedFont; ); exec(font)?; } - File::create(&"src/generated/fonts.rs")?.write_all(modrs.as_bytes())?; + File::create("src/generated/fonts.rs")?.write_all(modrs.as_bytes())?; Ok(()) } -- cgit v1.2.3