Skip to content

Commit

Permalink
ugly test
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Nov 16, 2024
1 parent 2542025 commit 8f1e52a
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/fntsys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 8f1e52a

Please sign in to comment.