improve GenImageFontAtlas() logging

This commit is contained in:
iikare 2022-06-26 21:58:24 -07:00
parent 6280b0a6ce
commit af95b3b71d
No known key found for this signature in database
GPG Key ID: 4906067E1F6AAB8C

View File

@ -715,12 +715,13 @@ Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **charRecs, int glyphC
// Recreate the atlas for the new, doubled size when all glyphs don't fit on the previous-sized atlas
// (but not on the first pass)
RL_FREE(atlas.data);
TRACELOG(LOG_INFO, "FONT: Font atlas of size %ix%i undersized, expanding atlas to %ix%i", atlas.width, atlas.height, atlas.width*2, atlas.height*2);
atlas.width = atlas.width*2; // Atlas bitmap width
atlas.height = atlas.height*2; // Atlas bitmap height
atlas.data = (unsigned char *)RL_CALLOC(1, atlas.width*atlas.height); // Create a bitmap to store characters (8 bpp)
TRACELOG(LOG_INFO, "FONT: Font atlas undersized, expanding atlas to %ix%i", atlas.width, atlas.height);
//
undersizedAtlasFlag = false;
}