From 5ee93acedc65069b9b41b82c2b7486b5a2ab4311 Mon Sep 17 00:00:00 2001 From: Hanaxar <87268284+hanaxar@users.noreply.github.com> Date: Tue, 4 Apr 2023 19:28:08 +0300 Subject: [PATCH] Fix GLYPH_NOTFOUND_CHAR_FALLBACK index value Currently if codepoint is not found; '_' character is returned. It's fixed by using index value of '?' character instead of using the character value. --- src/rtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtext.c b/src/rtext.c index 2d01360ef..c7c3c0bc8 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1253,7 +1253,7 @@ int GetGlyphIndex(Font font, int codepoint) // Support charsets with any characters order #define SUPPORT_UNORDERED_CHARSET #if defined(SUPPORT_UNORDERED_CHARSET) - int index = GLYPH_NOTFOUND_CHAR_FALLBACK; + int index = GLYPH_NOTFOUND_CHAR_FALLBACK - 32; // Index of '?' character (first character is space) for (int i = 0; i < font.glyphCount; i++) {