diff --git a/src/fntsys.c b/src/fntsys.c index ddd94a4c3..bac159abc 100644 --- a/src/fntsys.c +++ b/src/fntsys.c @@ -99,7 +99,7 @@ static FT_Vector delta; #define GLYPH_PAGE_OK(font, page) ((pageid <= font->cacheMaxPageID) && (font->glyphCache[page])) -static void fntLoadDefaults(char *path); +static int fntLoadDefaultInternal(char *path, int fontSize, int slot); static void fntCacheFlushPage(fnt_glyph_cache_entry_t *page) { @@ -287,7 +287,9 @@ void fntInit() for (; i < FNT_MAX_COUNT; ++i) fntInitSlot(&fonts[i]); - fntLoadDefaults(NULL); + fntLoadDefaultInternal(NULL, FNTSYS_DEFAULT_SIZE, FNT_DEFAULT); + delay(200); + fntLoadDefaultInternal(NULL, 12, 1); } int fntLoadFile(char *path, int fontSize) @@ -338,19 +340,6 @@ int fntLoadDefault(char *path) return fntLoadDefaultInternal(path, FNTSYS_DEFAULT_SIZE, FNT_DEFAULT); } -static void fntLoadDefaults(char *path) -{ - if (fntLoadDefaultInternal(path, FNTSYS_DEFAULT_SIZE, FNT_DEFAULT) != 0) { - LOG("FNTSYS Failed to load default font.\n"); - return; - } - - if (fntLoadDefaultInternal(path, 12, 1) != 0) { - LOG("FNTSYS Failed to load secondary font.\n"); - return; - } -} - void fntEnd() { LOG("FNTSYS End\n");