Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug TextMeshPro 3.2.0 does not support font asset creation with unicode fonts

Discussion in 'UGUI & TextMesh Pro' started by jennifer_unity277, Oct 17, 2023.

  1. jennifer_unity277


    Jan 18, 2022
    In my project (Unity 2021.3.31f1) there are source ttf font files with the following settings
    Font size: 16
    Rendering mode: Smooth
    Character: Unicode
    Ascent calculation mode: Face ascender metric
    Use legacy bounds: False
    Should round advance value: True
    With TextMeshPro 3.0.6, these fonts were used to create font assets (Create > TextMeshPro > FontAsset > SDF). But now with 3.2.0 I get the following error:
    Unable to load font face for [AppleGothic]. Make sure "Include Font Data" is enabled in the Font Import Settings.
    UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
    TMPro.TMP_FontAsset_CreationMenu:CreateFontAssetFromSelectedObject (UnityEngine.Object,UnityEngine.TextCore.LowLevel.GlyphRenderMode) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.5/Scripts/Editor/TMP_FontAsset_CreationMenu.cs:147)
    TMPro.TMP_FontAsset_CreationMenu:CreateFontAsset (UnityEngine.TextCore.LowLevel.GlyphRenderMode) (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.5/Scripts/Editor/TMP_FontAsset_CreationMenu.cs:110)
    TMPro.TMP_FontAsset_CreationMenu:CreateFontAssetSDF () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.5/Scripts/Editor/TMP_FontAsset_CreationMenu.cs:63)​

    Trying to generate the font atlas for already existing font assets from these source font files fails with this error:
    Font Asset Creator - Error Code [Invalid_File] has occurred trying to load the [AppleGothic] font file. This typically results from the use of an incompatible or corrupted font file.
    UnityEngine.Debug:Log (object,UnityEngine.Object)
    TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow: DrawControls () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.5/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:724)
    TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow:OnGUI () (at Library/PackageCache/com.unity.textmeshpro@3.2.0-pre.5/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:270)
    UnityEngine.GUIUtility: ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)