aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar /dev/urandom <johnfkennedymaili2p>2025-02-15 04:42:12 +0100
committerLibravatarLarge Libravatar /dev/urandom <johnfkennedymaili2p>2025-02-15 04:42:12 +0100
commita62d11357cca3b5063532f797f801cd002aff8bd (patch)
tree328eb9c7e3b9ae96c913ef24c02fcdb136d257e7 /build.rs
parent70a7a645dcd791ab8c33ee1096a815428e702ae3 (diff)
downloadcosin25-invite-mountainbytes-a62d11357cca3b5063532f797f801cd002aff8bd.tar.gz
cosin25-invite-mountainbytes-a62d11357cca3b5063532f797f801cd002aff8bd.tar.bz2
cosin25-invite-mountainbytes-a62d11357cca3b5063532f797f801cd002aff8bd.tar.lz
cosin25-invite-mountainbytes-a62d11357cca3b5063532f797f801cd002aff8bd.zip

chore: mention where released and shit

Diffstat (limited to 'build.rs')
-rw-r--r--build.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/build.rs b/build.rs
index 438cde8..094c779 100644
--- a/build.rs
+++ b/build.rs
@@ -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 {