diff options
chore: mention where released and shit
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -57,7 +57,8 @@ impl FontMetadata { } // TODO: do we *really* need i32 values here? wouldn't i16 be sufficient? image[2..6].copy_from_slice(&pixel_bounding_box.min.x.to_le_bytes()); - image[6..10].copy_from_slice(&(pixel_bounding_box.min.y + (scale.y / 2.0) as i32).to_le_bytes()); + image[6..10] + .copy_from_slice(&(pixel_bounding_box.min.y + (scale.y / 2.0) as i32).to_le_bytes()); image[10..14].copy_from_slice(&(glyph.h_metrics().advance_width).to_le_bytes()); positioned_glyph.draw(|gx: u32, gy: u32, v| { @@ -137,7 +138,11 @@ impl BakedFont for {name}Struct {{ }} fn has_char(&self, c: char) -> bool {{ match c as u8 {{", - format!("{}{}",font.scale.y.to_string(),if font.scale.y % 1.0 == 0.0 {".0"} else {""}) + format!( + "{}{}", + font.scale.y.to_string(), + if font.scale.y % 1.0 == 0.0 { ".0" } else { "" } + ) ); for char in font.unique_chars() { contents = format!( @@ -180,12 +185,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { fs::create_dir_all("src/generated")?; let mut modrs = "// Copyright is a sham this is a @generated file. use crate::font::BakedFont; -".to_string(); +" + .to_string(); let fonts = [ FontMetadata { name: "Galmuri", font: { Font::try_from_vec(fs::read("assets/fonts/Galmuri11.ttf")?).unwrap() }, - charset: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz2053: ", + charset: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz29053: %,", scale: Scale::uniform(20.0), }, FontMetadata { |