summaryrefslogtreecommitdiff
path: root/main.c3
diff options
context:
space:
mode:
Diffstat (limited to 'main.c3')
-rw-r--r--main.c313
1 files changed, 10 insertions, 3 deletions
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 <https://github.com/ColleagueRiley/RSGL/blob/main/examples/basics/rfont.c>
+* 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 <https://www.gnu.org/licenses/>.
*
*/
@@ -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;