I created a font atlas with most of the European languages.
Now I need to create different atlases for Russian, Arabic, and later Chinese.
The issue is that when I have to change the language of the game, I have to reassign the newly chosen atlas to all the texts (quite a lot actually).
There is a way to do it globally? It would be even better to have a “fallback” fonts list composed by multiple atlases.
In Unity, TextMeshPro has this feature that I used extensively. It allows to define a default font atlas, and, in case a char code is not listed in that atlas, it searches for it in the next atlas in the list.
It sounds like you could create a script to do that for you - look for the character code in your default font atlas (it’s in the asset data) and if it’s not there then load a different atlas. You could attach this script on all your text elements or you could only set text to text elements via this script so that it first checks the char codes before setting the text, something like fontLanguages.setText(textElement, 'string')
.
Yes, I already use a custom script on most of my text elements to address autosizing, shadow and localization. So I can do that.
There is a lot of space for improvement on Text Component, like default font (so that it could be easier to change the font of all the texts), effects (shadows, border, glow, gradients, etc…), fallback fonts and so on.
I hope it could get there one day.
So far there is a lot of additional code that I had to write to add these features.