I am a little confused about the font settings, but the below tag is the right way to change the font right?
<font=“Font name”>XYZ
The does correctly disappear from the text box in the TextMesh Pro gameobject but the <font=“Font name”> does not disappear and the font does not replace the default font. Do anyone know what I am missing? (yes tried placing the font both in and outside the resource folder)
Whenever the tag is displayed, this usually means an invalid tag or invalid format or in this case that TMP could not find / load the referenced font asset in the tag.
In order for the reference font asset to be loaded by the tag, the font asset must be located in the specific default location listed in the TMP Settings which by default is inside “Resources/Fonts & Materials/…” as seen below.
Thank you. The SDF file were corrupt for some reason, so when I deleted it and regenerated it then everything worked.
Also, I had to leave the font in the font folder where I originally had them and then only move the SDF file to the Fonts & Materials folder. It didn’t work if I moved both the Font file and the SDF asset to the Fonts & Materials folder.
The location of the font file in the project is not important. I place all my fonts in a folder called “Fonts”.
the location of font assets is very important for TMP to be able to load / reference them. This location needs to match the location in the TMP Settings.
min terms of font files, font assets hold an editor reference to the file. When the font asset is static and you build the project, the source font file is left behind since it is not needed. When the font asset is dynamic then the font file is included in the build. Since it is referenced by the font asset, again it’s location is not important.
Same issue. Also fixed when moved just the SDF assets into the root Fonts & Materials folder. They were unable to be found when nested within font specific folders (within root F&M) along with their font asset, also, didn’t work when they and the font asset were in the root F&M folder… not sure why but it is working now.
Font Assets must be located in the location specific in the TMP Settings which by default is “Resources/Fonts & Materials/…”. The Fonts & Materials location can be changed by the new location must still be located inside of a Resources folder.