REW

How Do I Add Fonts To Unity?

Published Aug 29, 2025 4 min read
On this page

This detailed article will guide you through adding custom fonts to Unity, covering both the recommended TextMeshPro (TMP) method and the standard legacy UI approach. The TMP method offers high-quality text rendering, while the legacy method is simpler for basic use.

Method 1: Using TextMeshPro (Recommended)

TextMeshPro is Unity's standard and most robust solution for all text-related tasks. It uses Signed Distance Field (SDF) rendering, which allows text to remain crisp and clear at any size and from any distance.

Step 1: Install the TextMeshPro package

  1. Open your Unity project.
  2. Navigate to Window > Package Manager.
  3. In the Package Manager window, search for "TextMeshPro."
  4. Select the TextMeshPro package and click the Install button.

Step 2: Import the font file

  1. Find your font file on your computer. Unity supports TrueType (.ttf) and OpenType (.otf) formats.
  2. Drag the font file from your file explorer directly into the Assets folder of your Unity project's Project window. It's best practice to create a new subfolder, such as Assets/Fonts, to keep your project organized.

Step 3: Create a TextMeshPro font asset

  1. In the Project window, right-click on the imported font file.
  2. Select Create > TextMeshPro > Font Asset.
  3. A new .asset file will be generated alongside your original font file. This is the font asset that TextMeshPro will use.

Step 4: Configure the font asset

  1. Click on the newly created font asset to open its settings in the Inspector window.
  2. To generate the character textures, click the Generate Font Atlas button.
  3. For specific character sets, you can change the Character Set property before generating the atlas. For example, selecting "Unicode Range" allows you to include support for languages like Chinese or Japanese.
  4. Once the atlas is generated, click Save in the lower-right corner of the window.

Step 5: Use the custom font in a UI object

  1. In your Hierarchy window, create a new TextMeshPro UI object by navigating to GameObject > UI > Text - TextMeshPro.
  2. Select the new Text object in the Hierarchy.
  3. In the Inspector, find the Font Asset field in the TextMeshPro - Text (UI) component.
  4. Drag your custom font asset from the Project window into this field to apply it to the text.

Method 2: Using the standard UI (Legacy)

For simpler text needs without the advanced features of TextMeshPro, you can use Unity's standard Text component. This method is straightforward and doesn't require generating a separate font asset.

Step 1: Import the font file

  1. Find your font file (.ttf or .otf).
  2. Drag the file into your Unity project's Assets folder.

Step 2: Configure font import settings

  1. Select the imported font file in the Project window.
  2. In the Inspector, you can adjust the Font Size, Rendering Mode, and Character set. Set the Character property to Dynamic if you want Unity to render glyphs on the fly, which is ideal for displaying text with a wide range of characters, such as for localization.
  3. Leave the Include Font Data checkbox enabled to ensure the font file is included in your build.

Step 3: Use the custom font in a UI object

  1. In your Hierarchy window, create a new standard UI Text object by navigating to GameObject > UI > Text (Legacy).
  2. Select the new Text object in the Hierarchy.
  3. In the Inspector, find the Text (Legacy) component.
  4. Locate the Font field and drag your imported font file from the Project window into this slot. The text will now use your custom font.

Best practices and troubleshooting

  • Licensing: Always check the licensing of any font you use in your projects. Some fonts are free for personal use but require a commercial license for games or apps.
  • Performance: If you use a dynamic font with a large character set, it can increase the size of your final build. For static text, consider creating a TextMeshPro font atlas with a smaller, specific character set to save space.
  • Fallback fonts: For handling multiple languages, TextMeshPro allows you to set fallback font assets. If a character is not present in your primary font, Unity will automatically search the fallback fonts to render it.
  • Resolution issues: If you notice blurry or jagged text, particularly with the legacy text system, try increasing the font's size in the Import Settings and then scaling down the UI element. For TextMeshPro, use the SDF render mode to ensure your text stays sharp.
  • Material presets: With TextMeshPro, you can create and reuse material presets to define the look of your text, including outlines, glows, and custom colors. This ensures visual consistency across your project without needing to reconfigure materials for each text object.
Enjoyed this article? Share it with a friend.