Browse Source

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

pull/3990/head
Ray 8 months ago
parent
commit
9d67f4734b
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/rtext.c

+ 5
- 1
src/rtext.c 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);

Loading…
Cancel
Save