Failure to load a font reverts to default font.

This commit is contained in:
2026-03-07 13:34:32 -08:00
parent 69bbe78ecc
commit ebfb748373

View File

@@ -345,7 +345,7 @@ S32 main(int argc, char *argv[])
state.font = LoadFontFromMemory(".ttf", opensans_ttf, opensans_ttf_len, 96, NULL, 0); state.font = LoadFontFromMemory(".ttf", opensans_ttf, opensans_ttf_len, 96, NULL, 0);
if(!IsFontValid(state.font)) { if(!IsFontValid(state.font)) {
fprintf(stderr, "Unable to load font\n"); fprintf(stderr, "Unable to load font\n");
return 1; state.font = GetFontDefault();
} }
GenTextureMipmaps(&state.font.texture); GenTextureMipmaps(&state.font.texture);
SetTextureFilter(state.font.texture, TEXTURE_FILTER_BILINEAR); SetTextureFilter(state.font.texture, TEXTURE_FILTER_BILINEAR);