I am attempting to create my own font fallback system for multilanguage support using UI Toolkit in Unity (Label class). This UI system does not intrinsically support fallback fonts.
I have some stylized English fonts I like which will be primary my first choice for some purposes. I want to make a list of all the unicode/regular characters in each of those fonts.
Then when I try to update a Label with a new string, I want to test the string to make sure it doesn't have any characters outside the list supported by the intended "stylized" English Font. ie. Test each character of the new string against my lists of supported characters.
If the new string has a character outside that list, I will instead assign a more generic backup font which covers most of the full Unicode range.
I see a script here for creating lists of glyphs within a font:
https://stackoverflow.com/questions/61573165/how-to-get-all-unicode-characters-supported-by-fonts
However, I cannot use it in Unity as it seems to rely on System.Windows.Media which is not available in my Visual Studio from Unity.
Is there any default way of doing this for a given Font that you have loaded into Unity? Thanks.