Font Source File (m_SourceFontFile_EditorRef) is null in newly created FontAssets in 1.4.0

For us, even in an empty Unity Project with TMPro 1.4.0, creating a new font asset via the Font Asset Creator causes the Source File of the font asset to be None.

Changing the Atlas Population Mode to Dynamic at this point causes an error as the system tries to copy the m_SourceFontFile_EditorRef variable to m_SourceFontFile, since it’s null (this is a guess from looking at the inspector in Debug mode).

Setting the Source Font File manually and only then changing to Dynamic works. However, if we change to Dynamic first (getting the error I mentioned above) and then add the Source File manually, m_SourceFontFile will remain null, causing any dynamic generation of characters to fail from then on. Changing to Static and back to Dynamic fixes this.

The main problem is the Source File being empty after creation. This also happens in 1.4.0-preview.3a, possibly before.

Cheers,
Daniel

Does it do this with any font file?

I can try to be certain tomorrow, but it did with at least two completely different fonts, both .ttf. Maybe you hadn’t time to try this yet but, if you did, did the problem not happen?

Thank you for reporting the issue. I was able to reproduce the issue. Please make the following changes.

These changes will be included in the next release of the TMP package.

1 Like

Thank you for confirming it and for the quick fix! :slight_smile:

1 Like

The latest version TMP 2.0.1 from Package Manager already included the change above?

It is not present in version 2.0.1. It will be in the next release which will be 2.1.0 which should be out very soon. I am going through the publishing process right now so within a few days.

1 Like