aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpmemewarenet>2025-01-12 03:18:35 +0100
committerLibravatarLarge Libravatar memdmp <memdmpmemewarenet>2025-01-12 03:18:35 +0100
commit424e0e328d9b7ffbb6669d67b034324b48ea777c (patch)
tree8679731b09cf116d72dcec9245e7729aef07a29e /build.rs
parent1dbb41ee40a27e1d6a6ac79ab83d55dce923856f (diff)
downloadcosin25-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

font-rendering
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs20
1 files changed, 3 insertions, 17 deletions
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<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),
},
];