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.
This commit is contained in:
Hanaxar 2023-04-04 19:28:08 +03:00 committed by GitHub
parent 17c443ee6d
commit 5ee93acedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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++)
{