diff --git a/Voile/Source/Resources/Loaders/FontLoader.cs b/Voile/Source/Resources/Loaders/FontLoader.cs index 5bf60c2..67b5eca 100644 --- a/Voile/Source/Resources/Loaders/FontLoader.cs +++ b/Voile/Source/Resources/Loaders/FontLoader.cs @@ -48,6 +48,17 @@ public class FontLoader : ResourceLoader error = FT_New_Memory_Face(*lib, (byte*)handle.Pointer, (nint)font.BufferSize, 0, &face); error = FT_Set_Pixel_Sizes(face, 0, (uint)font.Size); + error = FT_Select_Charmap(face, FT_Encoding_.FT_ENCODING_UNICODE); + + uint gid; + var charcode = FT_Get_First_Char(face, &gid); + + while (gid != 0) + { + Console.WriteLine($"Codepoint: {(char)charcode}, gid {gid}"); + charcode = FT_Get_Next_Char(face, charcode, &gid); + } + error = FT_Load_Char(face, 'F', FT_LOAD_NO_BITMAP); var metrics = face->glyph->metrics;