Show unknown characters as '?' in freetype fonts

This commit is contained in:
Nikita Lisitsa 2025-04-13 00:43:42 +03:00
parent 083e5841aa
commit 9f0f07885d

View file

@ -185,6 +185,9 @@ namespace psemek::fonts
else
{
glyph_id = FT_Get_Char_Index(face, ch);
if (glyph_id == 0)
glyph_id = FT_Get_Char_Index(face, '?');
glyph_mapping_[ch] = glyph_id;
}