Failure to load a font reverts to default font.
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user