Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 amrakdab · May 01, 2017 at 03:14 PM · fontsfontsizefont size

Font Size changes between PC and Mac

Hi, I am writing a game with my son. We are targeting ios, so need to depoly the app on MacOS, but do most of our development on PC. However, when we load the project in MacOS, the fonts are tiny. If we scale them up, then go back to PC, the fonts are huge. Is there any way to keep the font sizes consistent between the two operating systems?

Thanks

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 Dog-Gamer · May 01, 2017 at 03:15 PM 0
Share

Do you use any coding to control your fonts?

avatar image amrakdab Dog-Gamer · May 02, 2017 at 01:02 AM 0
Share

no, all setup in the editor

avatar image AtLeastImTrying · May 02, 2017 at 04:36 AM 0
Share

You might be able to check for which platform the user is on, then change the font size proportionate to that with GUIStyle.fontSize.

avatar image amrakdab AtLeastImTrying · May 02, 2017 at 11:21 AM 0
Share

correct me if im wrong, you can only check the platform the deployed app is running on? this is happening while in the editor with the platform being set to ios on both the PC and $$anonymous$$ac

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by AtLeastImTrying · May 03, 2017 at 11:41 AM

If you would like to change the size based on the OS being used, you can use Platform Dependent Compilation where it will ignore all code that is defined for a specific Platform/OS.

using UnityEngine; using SystemCollections; public class Example { public int fontSize; void Start { #if UNITY_EDITOR_OSX fontSize = (number) #endif #if UNITY_EDITOR_WIN fontSize = (number) #endif } }

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 AtLeastImTrying · May 02, 2017 at 05:38 AM 0
Share

Sorry I can't get it to "un-smush" so it's a little difficult to read.

avatar image
0

Answer by upasnavig90 · May 03, 2017 at 10:23 PM

you may use the best fit option in text component...it will adjust the size accordingly...

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 amrakdab · May 03, 2017 at 11:41 PM 0
Share

this sounds like a good workaround, ill try it out

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

6 People are following this question.

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

Related Questions

Dynamic fonts issue in GUI 1 Answer

How to calculate font size (or scale) for a given area base on how long a string is? 1 Answer

Best way to properly scale text? 0 Answers

How can I obtain an exportable font size? 0 Answers

Unity 2.6.3f1 Font Size Limit 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