WIP: use Unicode for charmaps inside a font, try read all unicode symbols.
This commit is contained in:
@@ -48,6 +48,17 @@ public class FontLoader : ResourceLoader<Font>
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user