Generate Font Atlas generates nothing for multiple fonts

Hi all,

I am trying to create the Start Menu on the Laser Defender course and I am unable to use Text Mesh Pro, as no Font Atlases are created for several fonts that I have tried to use. I have followed some online tutorials closely and cannot figure out what the problem could be. Here is a screenshot of the lack of atlas generated. I would attach the zipped files of the fonts, but it seems that I’m not allowed to. Any suggestions are much appreciated.

Hi Jackie,

Have you already tried to click on “Generate Fontatlas”? Of course, your font need to have the “Unicode Range” characters. Otherwise, it won’t work. You could test a different character set in that case.

Free fonts, especially those created by hobbyists, might be “wrong”. Each character must be mapped to a specific code. If that’s not the case, you’ll either have to edit the font or you’ll have to look for another font.

Also please feel free to ask our helpful community of students over on our Discord chat server.

Hi Nina,

Yes, I clicked on Generate Font Atlas and it shows the 0 characters. I just went back and tried it with the exact font used in the tutorial, The Batman Forever font from Dafont. This works for Rick, but does not work for me. I have now tried to Generate Fontatlas with 5 fonts, none of them work.

I will try to democratically spread future questions between here and the Discord community. Thanks for the resource.

Go to Window > Package Manager. Uninstall Text Mesh Pro and reinstall it.

Also try to select a different font size, maybe 10 for testing purposes.

Are there any error messages in your console when you try to create the font asset?

I have uninstalled and reinstalled and it doesn’t fix the problem. There are messages in the console:

No characters selected or invalid format.
UnityEngine.Debug:Log(Object)
TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow:ParseHexNumberSequence(String) (at Library/PackageCache/com.unity.textmeshpro@2.1.4/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:386)
TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow:DrawControls() (at Library/PackageCache/com.unity.textmeshpro@2.1.4/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:731)
TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow:OnGUI() (at Library/PackageCache/com.unity.textmeshpro@2.1.4/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:262)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Glyph packing completed in: 4.072 ms
UnityEngine.Debug:Log(Object)
TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow:Update() (at Library/PackageCache/com.unity.textmeshpro@2.1.4/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:295)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Font Atlas generation completed in: 0.170 ms
UnityEngine.Debug:Log(Object)
TMPro.EditorUtilities.TMPro_FontAssetCreatorWindow:Update() (at Library/PackageCache/com.unity.textmeshpro@2.1.4/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs:303)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

The “Font Atlas Generation Completed” message confused me, so I decided to save the file as an asset and try to use it. The asset file name is Test_test_batman. Surprisingly, the file has 2000 kb of content.

I then created a TextMeshPro Text and tried to apply Test_Text_batman font. It makes no change to the text and it still appears like the default Liberation Sans font.

TMP only works with TMP font assets, not with normal fonts.

The messages you pasted here indicate that there is an issue with the font file: “No characters selected or invalid format.”

Remove the font file and its .meta from your Assets folder. Download the font file again. Then open it in Windows or whatever you use to take a look at the glyphs. If you cannot open or install the font file, it’s broken.

If you can open it, I’d suggest to rename the font file. Remove the “__”. Then import it into Unity.

In the Font Asset Creator, test a different character set.

Under generate character set dropdown select Ascii something like that, and try again.

1 Like

The option you have selected for the Character Set option in the Font Asset Creator dialog requires additional input which does not appear to be set and this is the likely cause for the issue.
Either change it to ASCII as suggested by @111100 or one of the other options as mentioned in the screen shot below as per your requirement. The last 2 options in the screen shot relate to the option you have currently selected and wont be applicable if you select ASCII etc.

1 Like

@codermonk @111100

Thanks, you two. That solved my issue! :).

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms