I’m making an attempt to create my very own font fallback system for multilanguage assist utilizing UI Toolkit in Unity (Label class). This UI system doesn’t intrinsically assist fallback fonts.
I’ve some stylized English fonts I like which can be main my first selection for some functions. I wish to make an inventory of all of the unicode/common characters in every of these fonts.
Then when I attempt to replace a Label with a brand new string, I wish to check the string to verify it does not have any characters exterior the record supported by the supposed “stylized” English Font. ie. Check every character of the brand new string in opposition to my lists of supported characters.
If the brand new string has a personality exterior that record, I’ll as a substitute assign a extra generic backup font which covers a lot of the full Unicode vary.
I see a script right here for creating lists of glyphs inside a font:
https://stackoverflow.com/questions/61573165/how-to-get-all-unicode-characters-supported-by-fonts
Nevertheless, I can’t use it in Unity because it appears to depend on System.Home windows.Media which isn’t accessible in my Visible Studio from Unity.
Is there any default method of doing this for a given Font that you’ve loaded into Unity? Thanks.