mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-06 06:13:10 +00:00
Update rtext.c
This commit is contained in:
parent
83a167ca3f
commit
57e22d5fa0
@ -724,7 +724,8 @@ GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSiz
|
|||||||
stbtt_GetCodepointHMetrics(&fontInfo, cp, &glyphs[k].advanceX, NULL);
|
stbtt_GetCodepointHMetrics(&fontInfo, cp, &glyphs[k].advanceX, NULL);
|
||||||
glyphs[k].advanceX = (int)((float)glyphs[k].advanceX*scaleFactor);
|
glyphs[k].advanceX = (int)((float)glyphs[k].advanceX*scaleFactor);
|
||||||
|
|
||||||
if (cpHeight > fontSize) TRACELOG(LOG_WARNING, "FONT: [0x%04x] Glyph height is bigger than requested font size: %i > %i", cp, cpHeight, (int)fontSize);
|
// WARNING: If requested SDF font, sdf-glyph height is definitely bigger than fontSize due to FONT_SDF_CHAR_PADDING
|
||||||
|
if ((type != FONT_SDF) && (cpHeight > fontSize)) TRACELOG(LOG_WARNING, "FONT: [0x%04x] Glyph height is bigger than requested font size: %i > %i", cp, cpHeight, (int)fontSize);
|
||||||
|
|
||||||
// Load glyph image
|
// Load glyph image
|
||||||
glyphs[k].image.width = cpWidth;
|
glyphs[k].image.width = cpWidth;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user