About freetype2 switch face_index

"大牙开心就好" via FreeType users <[email protected]> Fri, 23 Jun 2023 20:22:43 +0800
Newsgroups gmane.comp.fonts.freetype.user
Message-ID <[email protected]>
Hi:


Is there any other function to switch the face_index when a font contains multiple fonts, besides specifying the face_index&nbsp;when creating the face?


Another way is to first release and then create, but this is not efficient.


for example:
&nbsp;&nbsp;
FT_New_Face(ft_Lib,pathname, 0, &amp;face);
FT_Load_Char( face, chr, FT_LOAD_RENDER | FT_LOAD_NO_HINTING | FT_LOAD_MONOCHROME );
...
FT_Done_Face(face);
FT_New_Face(ft_Lib,pathname, 1, &amp;face);
FT_Load_Char( face, chr, FT_LOAD_RENDER | FT_LOAD_NO_HINTING | FT_LOAD_MONOCHROME );

...
FT_Done_Face(face);


What I expect:


FT_New_Face(ft_Lib,pathname, 0, &amp;face);
FT_Load_Char( face, chr, FT_LOAD_RENDER | FT_LOAD_NO_HINTING | FT_LOAD_MONOCHROME );
...

//Calling a function to switch face_index&nbsp;to 1
FT_Load_Char( face, chr, FT_LOAD_RENDER | FT_LOAD_NO_HINTING | FT_LOAD_MONOCHROME );
...



Does freetype2 have such a function, or do you plan to add it in the future?


大牙开心就好
[email protected]



&nbsp;