• 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 /
  • Help Room /
avatar image
Question by can16358p · Dec 03, 2016 at 03:57 AM · fontfonts

Custom font all characters on top of each other

I'm trying to create a custom font to use (just for numbers). I've divided a 1280x512 file into a 5x2 grid of 256x256 spaces, put my custom drawing into the boxes through 0 to 9, saved it as transparent PNG. Here is a screenshot from Photoshop:

alt text

I've created a custom font, made the ASCII start offset 48, left everything default, created 10 character rects from index 0 through 9. Here is a screenshot showing everything clearly instead of writing everything one by one:

alt text

On the sixth element UV Y becomes 0, the rest goes the same.

I create a default GUI text, select my font and write 0123, but all the characters are on top of each other. The font is not obeying the Advance property. I've tried different values but it doesn't work for any positive value for the advance property. If I give a negative value, it works (e.g. puts the character at the right, as if I'm using a RTL language like Arabic) but of course, this is not what I want. If I type just one character it displays perfectly at the right place so I don't think there's any UV issue here. It really looks like I'm doing something wrong with the Advance value, but whatever I've tried (positive, negative, zero, huge numbers, fractions etc.) it doesn't work (with the exception of negatives that I've explained) I'm on Unity Personal 5.5.

What am I doing wrong?

screen-shot-2016-12-03-at-005329.jpg (133.1 kB)
screen-shot-2016-12-03-at-005516.jpg (148.8 kB)
Comment

People who like this

0 Show 5
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 TBruce · Dec 02, 2016 at 11:53 PM 0
Share

Can you provide the actual Photoshop image?

avatar image can16358p TBruce · Dec 03, 2016 at 12:13 AM 0
Share

I can't. I try to upload the zip file (271 kB) click the attach icon select my file and tap upload and it just stays there forever (pretty sure its not my fiber connection, it might be this site's restriction as it didn't allow me to upload a third image when I was trying to add a third screenshot in the question).

But, the image is the one you see at the first screenshot. 1280x512 transparent image at a 5x2 grid. Not sure why you want the image though, UV mapping works correct anyway?

avatar image TBruce can16358p · Dec 03, 2016 at 12:27 AM 0
Share

That is because UA only allows attachments on questions or answers and not comments or replies (with a max of 2). Edit the original post/question and replace one of the images with the zip file.

Show more comments
avatar image can16358p TBruce · Dec 03, 2016 at 09:06 AM 0
Share

I've uploaded the original image to Google Drive: https://drive.google.com/file/d/0BzBrnnSvTuDFZ2d6RUJtOExxVE0/view?usp=sharing

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by TBruce · Dec 03, 2016 at 09:00 PM

Attached is the zip file Number Font.zip. It contains the necessary files required for your bitmap font

  1. Number font.fontsettings (font character data)

  2. Number font (actual font)

  3. Number font.psd (packed font .psd file)

I have also included two screen shots in the zip file Examples.zip showing inspector example settings for using the font with a UI.Text component and a 3DText component.


number-font.zip (256.9 kB)
examples.zip (341.8 kB)
Comment

People who like this

0 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 TBruce · Jan 11, 2017 at 02:53 AM 0
Share

Hi @can16358p, Did this answer work for you?

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Implicit casting scriptable object to font in unity editor 0 Answers

Font Support 0 Answers

How to load font into variable 0 Answers

Why font does not get enough characters when typing machine , but getting enough to copy and paste this characters! 0 Answers

Making a translatable custom font 0 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