REVIEWED: LoadBMFont(), issue on not glyph data initialized

This commit is contained in:
Ray 2024-05-18 07:41:37 +02:00
parent 00ac9b6c53
commit 9d67f4734b
1 changed files with 5 additions and 1 deletions

View File

@ -2240,7 +2240,11 @@ static Font LoadBMFont(const char *fileName)
// Fill character image data from full font data
font.glyphs[i].image = ImageFromImage(fullFont, font.recs[i]);
}
else TRACELOG(LOG_WARNING, "FONT: [%s] Some characters data not correctly provided", fileName);
else
{
font.glyphs[i].image = GenImageColor(font.recs[i].width, font.recs[i].height, BLACK);
TRACELOG(LOG_WARNING, "FONT: [%s] Some characters data not correctly provided", fileName);
}
}
UnloadImage(fullFont);