- Home /
How can I change the text size on iOS and Android?
hello! important for me
i'm making a game for android and i want a bigger gui text i put it for 40 size and when i click play on pc it's 40pt, but when a build and run it on android it's smaller. so i cant take it bigger HELP!!!!!
Answer by jahroy · Jun 15, 2011 at 04:58 PM
I've never worked with Android, but here's something I wrote about iOS the other day:
To change the size of a font, you need to change it in the True Type Font Importer. This can be done by left-clicking on a font in your project view. My fonts are in the Standard Assets folder.
If you want to use fonts with different sizes in iOS, you need to import the same font multiple times. This can be done with the following steps:
find the .ttf file for some font in the Finder or Explorer
make a copy of the .ttf file and rename it something cool
find your new font in Unity (for me they're found at Project -> Standard Assets -> Fonts)
use your new font by dragging it onto a GUIStyle
Do NOT attempt to change the font size in the GUIStyle. This only works for dynamic fonts, which are not supported in iOS.
You also have to make sure that you have NOT chosen Dynamic as the character setting in the True Type Font Importer. I have always used unicode, but would guess that the ASCII settings might work as well.
THAN$$anonymous$$ YOUUUUU!!!!! IT WOR$$anonymous$$S
Answer by gmlove · Mar 09, 2012 at 09:39 PM
First of all, Dynamic fonts are only supported on PC and MAC platforms. So in order to get fonts to work on Mobile devices you must use Unicode for the Character set.
This is what you need to do. - Import a TTF font file in Unity. - Set the Character Set to Unicode. - All other information is up to you, size, anti-aliasing, etc - If you use the font in a GUIText, make sure that the "Font Size" is set to "0" and "Font Style" is set to "Normal".
OK LOVE U NA
The current version of Unity3D supports Dynamic fonts on iOS.
Answer by zhaolin · May 14, 2012 at 05:37 AM
I Import msyh.TTF font file in Unity,set the character set to Unicode,and set the font size to 8,the font can display correct,but when I set font size to 12 then display like below.Why is that so!
Answer by bubbalovesponge · Nov 09, 2012 at 07:06 PM
Download this and place into your Asset/Resource folder http://www.webpagepublicity.com/free-fonts/a/Antimony%20Funk.ttf
Add Varible public Font fontNormal; Within OnGui add this: GUIStyle myStyle = new GUIStyle(); fontNormal = Resources.Load("Antimony Funk", typeof(Font)) as Font; myStyle.font = fontNormal; myStyle.alignment=TextAnchor.MiddleRight; GUI.Label(new Rect(Screen.width-95,Screen.height-Screen.height+20,60,60), "iOS",myStyle);
Your answer
Follow this Question
Related Questions
how to scale and position guiText in android 1 Answer
Input text dosent always work on mobile devices, Android and iPhone 1 Answer
What the minimum size of built APK file? 1 Answer
Player size statistics in Editor.log - last scene is huge even in it;s empty 0 Answers
GUI Text is small on some phones? 0 Answers