TextMesh Pro: Font Asset Creation
Tutorial
·
Beginner
·
+10XP
·
15 mins
·
(13)
Unity Technologies

In this tutorial, we’ll learn how to set up Font Assets, the core of all text in TextMesh Pro.
Languages available:
1. Introduction
Font Assets are best thought of as containers for fonts. With them, you can import fonts into your projects and create countless variations of a font from one file without ever modifying the original.
If you want to import new custom or existing fonts into your project, Font Asset Creator will package the font into an atlas, a large Texture file containing characters from the font.
To use Font Asset Creator:
1. Create a new folder in your Assets directory for custom fonts, then copy a custom font into the folder. Fonts can either be downloaded or obtained from your system’s font directory.
2. Open the Font Asset Creator by navigating to Window > TextMeshPro > Font Asset Creator (Figure 01).

Figure 01: An example of the Bauhaus font imported into TextMesh Pro.
There are many options we can use, some of which might seem confusing at first. Let’s break them down:
Font Source: This is where you can select the custom font you’ve imported. You can also drag and drop the font from the directory into this slot.
Sampling Point Size / Font Size: This determines the accuracy of the SDF (Signed Distance Field) sampling in reproducing the font. The default setting of Auto Size will attempt to populate the atlas with all characters from the font. When set to Custom, higher values result in better reproduction. Generally a point size of 50 to 70 is a good range. Be cautious, however, because too large of a sampling size will prevent some characters from being in the atlas.
Font Padding: This dictates the size of effects (outlines, glow, bevels, etc.) from Font Materials. Generally, it’s good for the padding size to be at a 1:10 ratio to the sampling size. A sampling size of 60, for example, should have a padding size of 6. This, however, is not a hard and fast rule. Breaking this ratio can produce interesting effects that might better suit your aesthetic vision for your projects.
Packing Method/Mode: The method by which the atlas is populated. Fast is good for quickly previewing fonts, while Optimum is best reserved for the final atlas.
Atlas Resolution: The size of the atlas Texture. This is determined by the Sampling Point Size and Padding. You should cap Atlas Resolution at 2048x2048 for projects targeting mobile devices.
Character Set: Determines the range of characters to use within the font. The default is ASCII.
Custom Characters: Adds characters from an input field or another Font Asset
Custom Range: Adds characters from a hexadecimal range
Unicode Range (Hex): Adds characters from a unicode range
Characters from File: Adds a set of characters from a file. This can be useful for localization or a scenario in which manually populating an atlas would be impractical.
Render Mode: Determines how text will be presented. While displaying text at rasterized bitmaps is still supported, use SDF modes unless you’re rendering a small font on a 1:1 ratio (i.e., 10pt font rendered 10px on the screen).
Generate Font Asset: This generates the font Texture atlas used by the Font Asset, making the font available for use inside TextMesh Pro GameObjects.
3. Once all settings are to your liking, select Generate Font Asset to import your new font.
Once your Font Asset has been created, you can access individual settings within the Inspector.
2. Dynamic and static Font Assets
Sometimes we need to populate a Font Atlas with specific characters. One practical reason is creating a font from a subset of characters. This is particularly useful for languages with massive character sets (over 50,000 for Chinese). Most games use about 1,000 characters at most, and games with full Chinese and Japanese language support are some of the few that approach this range. Dynamic SDFs are an alternative way of populating a font atlas with only the characters we need by typing them into the input field. Font fallbacks will be used for all remaining characters as needed.
If desired, the font atlases generated by these dynamically populated Font Assets can be exported, modified to contain external characters (i.e., remapping ‘A’ to a symbol not found in any font atlas), then reimported into Unity.
It’s easy to create a dynamic Font Asset:
- Navigate to your desired font within the project hierarchy. Then right-click Create > TextMeshPro > Font Asset. This will create a Font Asset with an empty atlas.
- Click on the newly created Font Asset. In the Inspector, navigate to Generation Settings and make sure Atlas Population Mode is set to Dynamic.
- Navigate to the TextMeshPro Object, choose this new Font Asset, and input the desired characters as needed.
It’s good to pack Font Assets dynamically when you need to populate an atlas at runtime (such as for any input fields). However, this requires the source font to be referenced and included within the project build. Static Font Assets are good for containing characters you know will be used throughout the project (menu items, dialog subtitles/text boxes, etc.). As Static Font Assets include all the characters required for the project, they do not need to reference the original font source file.
In short, use static Font Assets for your “knowns” and dynamic Font Assets for your “unknowns.”
3. TMP Settings
The TMP Settings Asset found in the TextMesh Pro > Resources folder is used to assign and manage default fonts, Sprites, and fallbacks. While we can apply local settings to individual fonts, the settings in this asset will affect every TextMeshPro Asset in the Scene (Figure 03).

Figure 02: The main settings for all of our TMP Assets
4. Font Weights
Font weights describe the various appearances your font can take, i.e., bold, italic.
These variations can either be loaded from a new Font Asset or “faked” via the following settings, some of which are default values (Figure 03).


Figure 04: Manually defining the font weights for our Font Asset
5. Font fallbacks
Occasionally we want to reference characters that our font doesn’t contain. Instead of replacing our primary Font Asset, we can instead rely on a fallback. Fallbacks are additional Font Assets that will be referenced when a character does not exist in our primary font.
Font fallbacks can be set globally within the TMP Settings Asset or locally per Font Asset.
6. Multi-Atlas Textures
When dynamically populating a Font Atlas, there may come a point when the amount of characters exceed the size of the atlas. When this happens, characters that don’t fit will automatically be placed onto a new atlas and assigned as a fallback to the previous atlas. This is the underlying principle of Multi-Atlas Textures — the ability to populate new atlases as needed during run time. While their memory footprint is larger, they can be valuable for localization use and provide flexibility for modifying atlases at runtime.