diff options
| author | Ray <[email protected]> | 2024-05-18 07:41:37 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2024-05-18 07:41:37 +0200 |
| commit | 9d67f4734b59244b5b10d45ce7c8eed76323c3b5 (patch) | |
| tree | 24a23f0876e98b3e1298b096cb5e371e650a5adb | |
| parent | 00ac9b6c533e964ae2d5c5726e5d6c1f00964d0f (diff) | |
| download | raylib-9d67f4734b59244b5b10d45ce7c8eed76323c3b5.tar.gz raylib-9d67f4734b59244b5b10d45ce7c8eed76323c3b5.zip | |
REVIEWED: LoadBMFont(), issue on not glyph data initialized
| -rw-r--r-- | src/rtext.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rtext.c b/src/rtext.c index b5ba17e3..1ddb6250 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -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); |
