• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by moregergely000 · Jun 15, 2011 at 04:25 PM · androidtextsize

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!!!!!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
4

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image moregergely000 · Jun 15, 2011 at 05:30 PM 0
Share

THAN$$anonymous$$ YOUUUUU!!!!! IT WOR$$anonymous$$S

avatar image
1

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image thinkyhead_ · Feb 12, 2014 at 01:23 AM 0
Share

The current version of Unity3D supports Dynamic fonts on iOS.

avatar image
0
Wiki

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!

alt text


fontSize.jpg (14.4 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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);

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how to scale and position guiText in android 1 Answer

Why does assetbundle load change texture size? 1 Answer

Is there a way to get the size of text? 1 Answer

How to keep apk size low when using large 2d animations? 2 Answers

Remove "Preview text line" above keyboard input text on Android and iPhone 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges