embed ttf in exe

This commit is contained in:
andromeda
2026-01-17 20:29:25 +01:00
parent b51d2a4f12
commit 70a2e9a729
2 changed files with 2 additions and 4 deletions

BIN
fonts/Miracode.ttf Normal file

Binary file not shown.

View File

@@ -15,8 +15,7 @@ use vte::{Params, Parser, Perform};
use zeno::{Mask, Transform};
// params
const FONT: &str = "/home/andromeda/.nix-profile/share/fonts/truetype/Miracode.ttf";
const FONT: &[u8] = std::include_bytes!("../fonts/Miracode.ttf");
struct Buffer<T: std::clone::Clone> {
buffer: Vec<T>,
@@ -159,8 +158,7 @@ impl OutlineBuilder for Builder {
fn main() {
// initialize the font
let font_data = std::fs::read(FONT).unwrap();
let face = Face::parse(&font_data, 0).unwrap();
let face = Face::parse(FONT, 0).unwrap();
let font = generate_font(&face);
let mut model = Model::new(