Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
Question by Helkus · Jan 26, 2011 at 06:17 PM · iossizefont

Font size different on iPhone?

I've imported a .ttf font and set the Character to ASCII default set (it said I couldn't use dynamic fonts ) everything works fine on the mac, but when I deploy to device the font size appears to be the default size. I can set it to size 72 and it takes up most of the screen on the mac, but on the device the size never changes, anyone know what could be wrong?

Comment
Add comment · Show 4
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 JGeorge · Jan 26, 2011 at 06:41 PM 1
Share

Do you have your project set up correctly?

1)File>BuildSettings - $$anonymous$$ake sure your platform is set to iOS and click switch platform

2)In the Game window, set your resolution to the resolution you want your game to be. Then build that way. Works for me.

avatar image Helkus · Jan 26, 2011 at 07:49 PM 0
Share

Yeah it's set up, I've been deploying to device for some time now. I'm using iPhone tall 2:3 as the game window resolution, everything else looks identical on the phone as far as I can tell (it's orthographic 2d)

avatar image Helkus · Feb 01, 2011 at 03:29 PM 0
Share

You're right that it's resolution based, the problem is the game window would have to be huge to be 'actual' iPhone 4 resolution, and that doesn't help when the same app is deploying to iPhone 3 which is far smaller, there's no way to make it relative ?

avatar image biohazard2u · Aug 13, 2012 at 09:00 AM 0
Share

I'm having the same problem when building for Android. A GUIText set to Font Size 38 will look ok on PC but when I build to Android the size is default, therefore, too small. Sorry to bump this old question again, but does anybody know why? Cheers

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by tw1st3d · Aug 13, 2012 at 07:53 PM

iPhones can't import .ttf files, which is why using .ttf files for an iOS/Mac game is a bad idea. Use Helvetica and test the font sizes for both the Mac and iPhone and see what happens. If it still doesn't change, you need to make a conditional about whether or not it's on an iPhone and define the font size directly through that.

Good Luck.

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 biohazard2u · Aug 14, 2012 at 03:11 PM

Yes tw1st3d, that answer pointed me the right way, although I found this to be the best solution.

http://forum.unity3d.com/threads/58161-Unity-3-b6-iPhone-Fonts-problem

As Darell Nar is saying, dynamic fonts are only supported on PC and MAC platforms. This is what he says (and totally works out):

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". If one of your GUIText is set with different values for those two fields, you will get the error message!

So, you won’t be able to dynamically change the font size on your inspector or script, you will need to go to your font of choice and there select Character to Unicode and Font Size to whatever you want.

Thanks a lot to tw1st3d and Darrell Nar for your answers.

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.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

iOS Font Size much smaller on iPad 4 1 Answer

Textures sizes Web/PC vs iOS. 1 Answer

iOS GUIText size issue 1 Answer

size of GUI pics too big 1 Answer

max texture size ios 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges