aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
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 {{
"
);