From 18a4a99332b116ec1f094caa41616d4f17686435 Mon Sep 17 00:00:00 2001 From: andromeda Date: Wed, 29 Apr 2026 15:24:51 +0200 Subject: embed Miracode --- COMICSANS.ttf | Bin 135484 -> 0 bytes Miracode.ttf | Bin 0 -> 298920 bytes main.c3 | 13 ++++++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) delete mode 100644 COMICSANS.ttf create mode 100644 Miracode.ttf diff --git a/COMICSANS.ttf b/COMICSANS.ttf deleted file mode 100644 index 831e3d8..0000000 Binary files a/COMICSANS.ttf and /dev/null differ diff --git a/Miracode.ttf b/Miracode.ttf new file mode 100644 index 0000000..c366203 Binary files /dev/null and b/Miracode.ttf differ diff --git a/main.c3 b/main.c3 index cfe4894..725abd5 100644 --- a/main.c3 +++ b/main.c3 @@ -1,7 +1,12 @@ /* * -* Copyright (C) Andromeda 2026 -* ported from +* Copyright (C) 2026 andromeda +* +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along with this program. If not, see . * */ @@ -15,6 +20,8 @@ import libc::termios; faultdef FAIL_OPENPTY, FAIL_FORK; +char[*] font_data = $embed("Miracode.ttf"); + fn Window* init() { GlHints* hints = rgfw::getGlobalHints(); @@ -57,7 +64,7 @@ fn int main(String[] args) rsgl::renderer_updateSize(renderer, 500, 500); rfont::Renderer* renderer_rfont = rsgl::rfont::renderer_init(renderer); - Font* font = rfont::font_init(renderer_rfont, "COMICSANS.ttf", 60, 500, 500); + Font* font = rfont::font_init_data(renderer_rfont, &font_data, 60, 500, 500); int w; int h; -- cgit v1.3.1