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 /
This question was closed May 27, 2013 at 03:48 AM by sona.viswam for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by sona.viswam · Dec 27, 2012 at 04:09 AM · stringfont

Font issue in unity 3d

Hi I imported a font and using it in GUISkin for buttons. But I am getting a warning

 Font size and style overrides are only supported for dynamic fonts.
 UnityEngine.GUI:Button(Rect, String)

How to escape from this?

How can i make font in all devices with different font sizes

Thanks in Advance

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

3 Replies

  • Sort: 
avatar image
0
Best Answer

Answer by paulaceccon · Dec 27, 2012 at 02:25 PM

Are you building for Android/iOS? If so, this devices don't support dynamic fonts. Take a look at this:

http://answers.unity3d.com/questions/236207/font-size-and-style-overrides-are-only-supported-f.html

Comment
Add comment · Show 2 · 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 Waz · Dec 27, 2012 at 10:59 PM 2
Share

In Unity 4, dynamic fonts are supported on all platforms.

avatar image paulaceccon · Dec 28, 2012 at 10:14 AM 0
Share

Good to know, @Waz! :D

avatar image
1

Answer by sona.viswam · May 23, 2013 at 11:58 AM

 private float guiDiff;
 
 public GUIStyle scoreStyle;
 
 // in start function
 
 guiDiff = screenResolution.x / 480f;  (480 is my testing equipment width)
 
 scoreStyle.fontSize = Mathf.CeilToInt(15 * guiDiff);


Its works fine for me in all device.

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 Ashish Dwivedi · May 23, 2013 at 12:26 PM

I am using this method. This will scale font according to different devices and works fine.

alt text


screen shot 2013-05-23 at 5.52.20 pm.png (25.9 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

Follow this Question

Answers Answers and Comments

12 People are following this question.

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

Related Questions

while passing to a function in Prime31 throws error 1 Answer

How to find a font via script? 2 Answers

Split string, add action to every word 1 Answer

Is there a way to measure the pixel with/height of a string with a given font? 2 Answers

Unity3D - How To Use BitMap Font 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