- Home /
Foreign language true type fonts rendering fine on Mac, but not on iPhone?
I've tried importing Japanese and Chinese true type fonts in to Unity. The fonts import correctly and the characters show up properly in the material.
The fonts import into the material in Unity with a size of 256x128 for the font texture. I am expecting since I did import them as font textures and set the font even as the default font for my GUISkin (as a test), it would definitely work, but no joy so far no matter which fonts I've tried.
When I run my app in locally on the iMac, the fonts render correctly using the foreign characters, but as soon as I deploy to the iPhone, the character render only in some default English font.
After trolling the forums, I haven't really seen a similar issue posted where rendering the font works fine on the Mac, but not on the iPhone.
Any ideas what's wrong here?
It seems the issue I'm having is when I try to change the guiSkin.font at runtime to one of my localized fonts, it's failing to switch it and then defaults to the default system font ins$$anonymous$$d. But if I actually set the font for the GUISkin in the designer and then deploy, that works. I'm trying like so in the script: guiSkin.font = japaneseFont;
japaneseFont is assigned the TTF in the designer, so it's not null.
Answer by Eric5h5 · Apr 12, 2011 at 12:32 AM
iPhone doesn't have dynamic fonts. This makes it hard/impossible to support huge character sets like Japanese fonts, since you're limited to 2048x2048 for a single texture, or 1024x1024 on older devices.
This I do understand. That's why the test font I'm using for Japanese is only 256 x 128 in size, so texture size won't be the issue. But by dynamic, does this mean I cannot change the font assignment on a GUISkin at runtime? The GUISkin has to already be set at deployment only? That does seem to be the behavior I'm seeing...
Dynamic means that it generates the characters on the fly as needed, ins$$anonymous$$d of generating an entire pre-rendered texture ahead of time.
Your answer
Follow this Question
Related Questions
Changing the font size of GUIText (on Unity iPhone)? 1 Answer
Hindi characters not showing up in windows phone 8 1 Answer
Simple way to change GUIText font size 4 Answers
Arabic/Hindi/etc support for Android? 0 Answers
How to find a font via script? 2 Answers