From 57e22d5fa0781211815a55d27142a22b37b152aa Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 18 Nov 2025 21:26:26 +0100 Subject: [PATCH] Update rtext.c --- src/rtext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rtext.c b/src/rtext.c index 1705e5b49..1c70aedc1 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -724,7 +724,8 @@ GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSiz stbtt_GetCodepointHMetrics(&fontInfo, cp, &glyphs[k].advanceX, NULL); 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 glyphs[k].image.width = cpWidth;