Update rtext.c

This commit is contained in:
Ray 2024-08-25 13:55:53 +02:00
parent 5604f6d8a3
commit f5ef357810
1 changed files with 2 additions and 0 deletions

View File

@ -677,6 +677,8 @@ GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSiz
{ {
stbtt_GetCodepointHMetrics(&fontInfo, ch, &chars[i].advanceX, NULL); stbtt_GetCodepointHMetrics(&fontInfo, ch, &chars[i].advanceX, NULL);
chars[i].advanceX = (int)((float)chars[i].advanceX*scaleFactor); chars[i].advanceX = (int)((float)chars[i].advanceX*scaleFactor);
if (chh > fontSize) TRACELOG(LOG_WARNING, "FONT: Character [0x%08x] size is bigger than expected font size", ch);
// Load characters images // Load characters images
chars[i].image.width = chw; chars[i].image.width = chw;