From 424e0e328d9b7ffbb6669d67b034324b48ea777c Mon Sep 17 00:00:00 2001 From: memdmp Date: Sun, 12 Jan 2025 03:18:35 +0100 Subject: fix: last pixel rendering shit --- build.rs | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'build.rs') diff --git a/build.rs b/build.rs index 7c73c0e..d932c86 100644 --- a/build.rs +++ b/build.rs @@ -29,22 +29,8 @@ impl FontMetadata { bounding_box.unwrap() } }; - let bounding_box = { - let bounding_box = glyph.exact_bounding_box(); - if bounding_box.is_none() { - Rect { - min: Point { x: 0.0, y: 0.0 }, - max: Point { - x: pixel_bounding_box.width() as f32, - y: 0.0, - }, - } - } else { - bounding_box.unwrap() - } - }; - let width = bounding_box.width() as u32; - let height = bounding_box.height() as u32; + let width = pixel_bounding_box.width() as u32; + let height = pixel_bounding_box.height() as u32; let mut image: Vec = Vec::new(); @@ -207,7 +193,7 @@ use crate::font::BakedFont; FontMetadata { name: "CherryBombOne", font: { Font::try_from_vec(fs::read("assets/fonts/CherryBombOne.ttf")?).unwrap() }, - charset: "UwUSpace ", + charset: "UwU-Space", scale: Scale::uniform(36.0), }, ]; -- cgit v1.2.3