diff options
author | 2025-01-12 03:18:35 +0100 | |
---|---|---|
committer | 2025-01-12 03:18:35 +0100 | |
commit | 424e0e328d9b7ffbb6669d67b034324b48ea777c (patch) | |
tree | 8679731b09cf116d72dcec9245e7729aef07a29e /build.rs | |
parent | 1dbb41ee40a27e1d6a6ac79ab83d55dce923856f (diff) | |
download | cosin25-invite-mountainbytes-font-rendering.tar.gz cosin25-invite-mountainbytes-font-rendering.tar.bz2 cosin25-invite-mountainbytes-font-rendering.tar.lz cosin25-invite-mountainbytes-font-rendering.zip |
fix: last pixel rendering shit
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 20 |
1 files changed, 3 insertions, 17 deletions
@@ -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<u8> = 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), }, ]; |