aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpmemewarenet>2025-01-11 23:50:49 +0100
committerLibravatarLarge Libravatar memdmp <memdmpmemewarenet>2025-01-11 23:50:49 +0100
commitf310c1af432b216edcafb23fe0622ea66fca9591 (patch)
treea4be4ddfd8d160482eb5029c7469b9135dc5a443 /build.rs
parentf5152a1e36f7e765f5894370fead0d5602894f8b (diff)
downloadcosin25-invite-mountainbytes-f310c1af432b216edcafb23fe0622ea66fca9591.tar.gz
cosin25-invite-mountainbytes-f310c1af432b216edcafb23fe0622ea66fca9591.tar.bz2
cosin25-invite-mountainbytes-f310c1af432b216edcafb23fe0622ea66fca9591.tar.lz
cosin25-invite-mountainbytes-f310c1af432b216edcafb23fe0622ea66fca9591.zip

feat: get_char should return a character with render-ready information

Diffstat (limited to 'build.rs')
-rw-r--r--build.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/build.rs b/build.rs
index 3a4b452..7b7b410 100644
--- a/build.rs
+++ b/build.rs
@@ -2,6 +2,8 @@ use rusttype::{Font, Point, Scale};
use std::fs::{self, File};
use std::io::{self, Write};
+// TODO: Build a Rust Macro that does what this does but without a build.rs
+
#[derive(Clone)]
struct FontMetadata {
pub charset: &'static str,
@@ -103,9 +105,8 @@ fn generate_struct(font: &FontMetadata) -> io::Result<String> {
let name = font.name;
let mut contents = format!(
"pub struct {name} {{}}
-impl {name} {{}}
impl BakedFont for {name} {{
- fn get_char(c: char) -> &'static [u8] {{
+ fn get_char_bytes(c: char) -> &'static [u8] {{
match c as u8 {{
"
);