Character Not Found In Texmesh Pro Version 1.4.0

Text mesh pro not showing correctly, i got this error in unity 2018.3.8.f1, already tried to reimport the texmesh package, install reinstall, etc. Other person with the same project has the text working perfectly, and i already tried to delete the project and get the person version, but it isn’t fixed the problem.

The character used for Underline and Strikethrough is not available in font asset [D-DIN SDF].
UnityEngine.Debug:LogWarning(Object, Object)
TMPro.TMP_Text:GetSpecialCharacters(TMP_FontAsset) (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMP_Text.cs:5451)
TMPro.TextMeshProUGUI:LoadFontAsset() (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMPro_UGUI_Private.cs:561)
TMPro.TextMeshProUGUI:OnValidate() (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMPro_UGUI_Private.cs:302)

NullReferenceException: Object reference not set to an instance of an object
TMPro.TMP_Text.CalculatePreferredValues (System.Single defaultFontSize, UnityEngine.Vector2 marginSize, System.Boolean ignoreTextAutoSizing) (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMP_Text.cs:3942)
TMPro.TMP_Text.GetPreferredWidth () (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TMP_Text.cs:3540)
TMPro.TextMeshProUGUI.CalculateLayoutInputHorizontal () (at Library/PackageCache/com.unity.textmeshpro@1.4.0/Scripts/Runtime/TextMeshProUGUI.cs:93)
UnityEngine.UI.LayoutRebuilder.m__2 (UnityEngine.Component e) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:84)
UnityEngine.UI.LayoutRebuilder.PerformLayoutCalculation (UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction1[T0] action) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:147) UnityEngine.UI.LayoutRebuilder.PerformLayoutCalculation (UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction1[T0] action) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:144)
UnityEngine.UI.LayoutRebuilder.PerformLayoutCalculation (UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction1[T0] action) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:144) UnityEngine.UI.LayoutRebuilder.PerformLayoutCalculation (UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction1[T0] action) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:144)
UnityEngine.UI.LayoutRebuilder.PerformLayoutCalculation (UnityEngine.RectTransform rect, UnityEngine.Events.UnityAction`1[T0] action) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:144)
UnityEngine.UI.LayoutRebuilder.Rebuild (UnityEngine.UI.CanvasUpdate executing) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Layout/LayoutRebuilder.cs:84)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:171)
UnityEngine.UI.ScrollRect:LateUpdate()

This is a warning that indicates the character used for Underline and Ellipsis are not present in the current font asset.

Is the other person using the same font asset?

Are you getting this behavior on a newly created font asset set to the new dynamic mode?

It’s not a new font asset, the font asset was working ok before i update the unity. The other person is using the exactly same font asset, and project sync by git and the font are fine, wihtout erros. The uniity version of the other person is the same too.

Check if the other person has Disable Warnings enabled in the TMP Settings.

4415317--402385--upload_2019-4-10_16-40-42.png

No, it`s as default value

4419280--402919--WhatsApp Image 2019-04-11 at 18.14.30.jpeg

If you look at the character and glyph table for that font asset, do you see the underline and ellipsis character in there?

4419430--402943--upload_2019-4-11_15-57-10.png

If you still can’t find the cause for this, please submit a bug report with the project attached and I will gladly take a look to figure out what’s going on.

Please be sure to provide me with the case #.

All text mesh information i`ve found:

4419475--402949--Sem título.png
4419475--402952--Sem título2.jpg

Something appears to have gone wrong in the upgrade of the font asset when version 1.4.0 of the package was installed.

Looking at the atlas texture, the font asset appears to contain the Extended ASCII range so simply regenerate the font asset and select Character Set - Extended ASCII or alternatively, pull from your repository to get the same content / assets that your other developer is using.

P.S. I am currently making improvements to the font asset upgrade process which will be included in the next release of TMP.

As such if you are able / have the time to submit a bug report including your project (using a version going back to prior to upgrading to version 1.4.0) I will gladly take a look at it to make sure these improvements behaves as expected and avoid whatever potential issue you ran into.

Wow, it worked fine, thanks for your time and help provided!!!

You are most welcome :slight_smile:

We just upgraded our project to 2018.4.8 with TMP 1.4.1, and we just started receiving warnings regarding missing characters in one of our fonts:

  • The character used for Underline and Strikethrough is not available in font asset.
  • The character used for Ellipsis is not available in font asset.

It should be noted that this is a decorative font, and it does not contain many glyphs.

Are these two character required by TMP, or is this something we can do to have their absence ignored? Can we provide a custom character set when the SDF is built?

In the TMP Settings, you can disabled the warnings about these missing glyphs and characters.

Thanks!

I ended up modifying the font by adding the two missing glyphs, even though they won’t be used by the project. The warnings no longer appear.

I left the warning enabled, because I didn’t want to silence warnings in general. I just didn’t care about those glyphs for that one font.

@Stephan_B

Hello,

I just upgraded to Unity 2018.4.9f1 with TMP Package 1.4.1 - current - verified.

I am encountering the same issue that matheustaveiros did in one of my fonts.
I rebuilt my font as you described, and I am still getting this output spam.

Any help would be appreciated.
Thank you
Lester

Hi @Stephan_B ,

Any idea as to why rebuilding the font didn’t solve this issue for me?

I am encountering the same issue as the OP. My font includes the characters; I can search and find them in the character table.

I rebuilt as you suggested above, and the warnings still persist.