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 emmanuel_unity · Oct 11, 2018 at 02:40 PM · uitypefontsize

Photoshop font size VS Unity font size

Hello there. Is there a ratio for "Photoshop to Unity" font size? I do a lot of UI sketches in Photoshop and when it comes to integrating assets et re-doing the typography in Unity there is a very big difference in point sizes (PT) between the two work environments.

I've done a few tests and it seems like 1 PT in Unity = 0.42 ... But it's not always the case. I can't believe there is a more efficient way to do this in Unity? Please advise. Thank you,

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Matthew_Ostil · Oct 11, 2018 at 07:00 PM

There is no magical ratio because you need to have some point of reference.

That said, you can definitely get 1:1 font sizes going. This is going to assume you're using the Unity screen space UI. When you create a new UI Canvas, open up the Canvas Scaler component and set the scale mode to Scale with Screen Size. Set the dimensions to whatever you're using in Photoshop.

Now, create a TextMeshPro UI object as a child. If you set the font size to your Photoshop one, it should align correctly. I've attached a screenshot example using Illustrator and a font size of 100.

The cool thing is that this also works with UI placement as well. With proper anchoring in Unity, you can easily set up UI down to the pixel point easily and quickly. Makes implementing external concepts a painless process, especially if you use something like Zeplin.alt text


test.png (21.1 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 emmanuel_unity · Oct 11, 2018 at 08:48 PM

Thank you for the quick response! :) We are apparently already using these settings and still, there are some differences (small but still noticeable). I'll try and give you a test of our own soon ...

Could there be some confusion on our part linked to screen resolution? We are building applications for 4K screens but are using 1080p screens at our workstations... By default, I feel this wouldn't be a problem... but since Unity is a bit out of my usual playground, some unknown factors to me may come into play? Thanks again for these clarifications.

PS. I forgot to mention it in my previous post, but all my sketches in Photoshop are using screen size resolution ( 72 dpi ).

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 Matthew_Ostil · Oct 11, 2018 at 08:54 PM 0
Share

In Unity, you simply need to set the reference resolution in the canvas that matches what you're using in your Photoshop artboard. So, in my example I made a literal 1920x1080 artboard in Illustrator to get the exact points. However if for whatever reason I couldn't (such as wanting to do a 4k resolution), I would have to calculate the % difference to get the correct font size.

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

155 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image 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

UI.Text font size is somehow resized >_< 0 Answers

How can I calculate the height of one line in a Text component? 2 Answers

How to get the current "best fit" size of a Text component? 3 Answers

Change font size of Unity 3D application 1 Answer

How to edit UI Text from script 3 Answers


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