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?)

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.

I just tried the Plugin “Font Setter-Packer” from the Asset Store here: Unity Asset Store - The Best Assets for Game Making
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: Font Setter / Packer Tutorials - YouTube