Creating a Font Asset file for use with TextMeshPro
The powerful TextMeshPro system is now core to Unity’s UI system. While the TMP (TextMeshPro) Essentials comes with two fonts (Arial and Liberation Sans), and there are more available in the TMP examples, often you may have an existing font, or perhaps one from a client, that you will wish to use with your Unity project. In this recipe, we’ll go through the steps of creating a Font Asset file, so you can then use whatever fonts you wish in your Unity projects.
Note: ensure you have a license appropriate for any fonts you use.
Getting ready
For this recipe, we have prepared the font that you need in a folder named Fonts
in the 01_01
folder. Many thanks to Severin Meyer for making this font freely available at dafont.com.
How to do it...
To create a Font Asset file for use with TextMeshPro, follow these steps:
- Create a new 2D (Core) project.
- Import the provided
Fonts
folder...