I'm getting a strange problem when changing the font dynamically on iOS (which I need to do for localisation).
I've got my fonts in my Resources folder, and am changing them at runtime like this:
textBox.font = (Resources.Load("euro_blue") as GameObject).GetComponent<tk2dFont>()
... and it works fine in the editor. No problems.
BUT... when I compile for iOS and test on a device, the changed fonts show up all garbled as if they are using a spritesheet from another seemingly random font asset in the library.
The only way I've found to fix it is to manually place a textfield somewhere off-camera in a scene with its font set to the new one that I'm changing too. Which kind of reminds me of working in Flash circa 2003.
It's as if the fonts I have in my Resources folder aren't actually getting packaged into the app unless I brute-force it by placing dummy text fields in my scene.
I can of course, just do the above, but it feels super-clunky and obviously doesn't scale well as I add more fonts. Am I missing something?