- Home /
Using fonts in Unity - iOS devices
Hi,
I'm an artist working on a small team using Unity 3. I've imported several .ttf fonts into our project and am using them in GUItext objects, but we're having trouble getting them to display on the iOS devices.
I've read some stuff about not being able to use fonts set to 'dynamic' on these devices - could someone explain to me what the resitrictions are using imported fonts on the iPad and iPhone?
So far I've created materials to colour the text and have set strings to various sizes in the inspector. Ideally I'd like to be able to keep these changes across all platforms, but it seems this may not be possible.
Can anyone give me any info / suggest how I could work around this?
Cheers
Answer by Helkus · Jan 26, 2011 at 08:10 PM
For changing the color, I made a script like this :
var textOverrideColor : Color = color.white;
function Start() { guiText.material.color = textOverrideColor; }
And attached it to the GUIText object, you can then use the color picker on the object to select the color, or set it by code. And you don't have to make different colored materials. As for sizes, I'm having a problem where font sizes don't change on the device so I can't help you there :/
Answer by AtomicMarine · Jan 26, 2011 at 08:34 PM
You cannot change the colors or sizes of fonts on the IOS and have to import different fonts for different needs.
However you can change the default size and color of the font, and then import the same font and give it another default size and color.
Its more work yes, but pays off in the end if u need one font to be like 4 different colors and sizes you may need 4-16 different files of the same font.
Size is changed in the import settings
Color is changed by changing the Font Material's default color in the inspector view.
Once happy change its name, then import the same font again and change the settings to get desired effect.
Your answer
![](https://koobas.hobune.stream/wayback/20220613080854im_/https://answers.unity.com/themes/thub/images/avi.jpg)