src/font.c

changeset 253
6ab35fcb8676
parent 214
9d460888a83e
--- a/src/font.c	Tue Aug 05 16:53:25 2025 +0200
+++ b/src/font.c	Tue Aug 05 20:00:24 2025 +0200
@@ -34,6 +34,8 @@
 #include <math.h>
 #include <cx/array_list.h>
 
+#include <SDL3_ttf/SDL_ttf.h>
+
 static const char *asc_font_filename(enum AscFontStyle style) {
     switch (style) {
         case ASC_FONT_REGULAR:
@@ -97,7 +99,7 @@
     entry.ttf = TTF_OpenFont(fpath.ptr, font.size);
     cx_strfree(&fpath);
     if (entry.ttf == NULL) {
-        asc_error("Failed to load font %s: %s", font_name, TTF_GetError());
+        asc_error("Failed to load font %s: %s", font_name, SDL_GetError());
         return NULL;
     } else {
         cxListAdd(asc_font_cache, &entry);

mercurial