Re: About freetype2 switch face_index

"大牙开心就好" via FreeType users <[email protected]> Fri, 23 Jun 2023 23:24:03 +0800
Newsgroups gmane.comp.fonts.freetype.user
Message-ID <[email protected]>
Thank you!
I am referring to TrueType Collections.
It seems that I can only create another 'FT_Face' object.



大牙开心就好
[email protected]



&nbsp;




------------------&nbsp;Original&nbsp;------------------
From:                                                                                                                        "Werner LEMBERG"                                                                                    <[email protected]&gt;;
Date:&nbsp;Fri, Jun 23, 2023 11:04 PM
To:&nbsp;"大牙开心就好"<[email protected]&gt;;"freetype"<[email protected]&gt;;

Subject:&nbsp;Re: About freetype2 switch face_index 




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

It depends.&nbsp; In TrueType Collections, fonts with different font
indices might be really completely different fonts, so you can't avoid
creating another `FT_Face` object.

However, if you are referring to named instances of Variation Fonts
you can use function `FT_Set_Named_Instance`.


&nbsp;&nbsp;&nbsp; Werner