Working with fonts
It’s extremely likely that you won’t want to use the default Arial (UI Text) or Liberation Sans (TMP Text) fonts and will want to bring a custom font into your project. Let’s explore how you can both find these text resources and use them in your project.
Note
You do not have to install a font onto your computer (to use within programs outside of Unity) to use the font within Unity.
Importing new fonts
The font file formats accepted by Unity are .tff
(TrueType) and .otf
(OpenType). You can get these files in multiple places. My favorite places to find fonts are as follows:
- Google Fonts: https://fonts.google.com/
- DaFont: http://www.dafont.com/
- Font Squirrel: https://www.fontsquirrel.com/
All the fonts on Google Fonts are open source and are free for personal or commercial use (at least at the time of writing this book), but the fonts on Font Squirrel and DaFont have varying licensing options. Ensure that any...