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
4
Question by Mortennobel · Jun 30, 2011 at 07:30 PM · fontttf

Font effects

What is the best way to render text with font effects in Unity? Like the following image:

alt text

What I would like to know is:

  • What can be done run-time (I think some effects must be possible using shader effects)

  • What can be done in a post-processing step (This could include the SaveFontTexture script)

  • What are the limitations (ASCII support? ISO_8859-1 support? Unicode support? Multiple font sizes?)

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
3
Best Answer

Answer by jonas-echterhoff · Aug 01, 2011 at 12:37 PM

What you can do at runtime is mostly limited by your creativity and skill in writing shaders. Basically just create a custom Font material using the font texture from the font, but your own shader. You should then be able to use that material with GUITexts and TextMeshes.

For offline processing, it's easiest to just copy the font texture created by Unity (either using the script you linked to, or by simply taking a screenshot of the inspector if the texture is small enough to show unscaled), and edit that texture in Photoshop. Make a custom material using your texture, and use that. Just make sure that the characters in the texture all stay in the same position and don't get larger. This option only works on static fonts, you have to pick an option other then "Dynamic" in the font importer, as dynamic fonts expect Unity to rewrite the font texture as needed.

For most flexibility, you can also create a custom font with your own font texture, but that means you have to manually set up the texture coordinates for each character, which means it is a lot of work to get right.

Comment
Add comment · Show 3 · 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 Essential · Sep 12, 2012 at 04:45 PM 0
Share

Apparently the SaveFontTexture method won't work in Unity 4 though...?

avatar image jonas-echterhoff ♦♦ · Sep 18, 2012 at 07:01 AM 4
Share

Unity 4 has this functionality built-in. Click on the gear menu in the font importer inspector, and select "Create Editable Copy", which creates a copy of the font asset with a png file for the texture and a mat file for the material, which you can then proceed to edit as you like.

avatar image Essential · Sep 18, 2012 at 08:40 PM 0
Share

Ah, didn't know that. Thanks Jonas!

avatar image
0

Answer by j00hi · Mar 12, 2013 at 09:16 AM

I just tried the Plugin "Font Setter-Packer" from the Asset Store here: https://www.assetstore.unity3d.com/#/content/6594 and it is really great, does a perfect Job, you can import custom fonts very easily, the Tool is enormously helpful. Importing a custom font (created with e.g. Photoshop) can be done really fast. Just follow the video tutorials here: http://www.youtube.com/playlist?list=PL3Mj-QGBidI3EvVRJEaw0zLovfSX9kZdf

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity font textures not readable? 4 Answers

Custom Font on iOS4.3.2 & iOS5.0 ?? 0 Answers

Fill Font Characters with White? 0 Answers

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

Are there anyway to load ttf file as font at runtime already? 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