Well, in the old days it’s easy to just assign .font to Text… but TMPro requires font material assets… if you have many many fonts, using their built-in tool becomes tedious
Is there a way to batch convert all fonts in a folder to be usable for TMPro? Ideally so I can assign them to an array etc.
Creating font assets in the Editor is much easier now as you can simply select the font file and use the context menu “Create - TextMeshPro - FontAsset” or use CTRL-SHIFT-F12.
This will create a dynamic font asset which can later be turned into a static font asset.
See the following videos which provide more insight on all of this including how to handle CJK and localization along with explanation of the Multi Atlas Texture feature in the latest releases and suggest workflows.
Font assets can also be created at runtime via scripting using TMP_FontAsset.CreateFontAsset() function. There should be a few posts about this.
You could implement your own Editor script to automate the process using the above function but would need to use the AssetDatabase to make these assets persistent.
This did not work when I selected multiple… only converted first one… Is there a way to select more than one font file to convert them? Or do you have to do that by selecting each one?
Also Fn-F12 does not work on the new macbooks (2016 and later) with the touchbars
You have to select each font file at a time. I can look at adding some Editor functionality to support multi-selection of font files.
Make sure you are using the latest release of the TMP package which is version 1.5.0 for Unity 2018.4, version 2.1.0 for Unity 2019.x and version 3.0.0 for Unity 2020.x.
Other than that, this menu short cut should work. This isn’t TMP specific functionality maybe there is any issue with shortcut.