[TextMeshPro] <font> rich text tag not working

Hello,

I am trying to get the rich text font support working. If I use the following input, with any of my fonts, I always get the following output, but with no font actually changed.

Input
<font=“fontAssetName”>string

Output
<font=“fontAssetName”>string

I am referring to the information found here Rich Text, TextMesh Pro Documentation

Any help would be aprpeciated
Thanks

1 Like

It appears as though it’s failing with every font asset that I have personally created. The font assets that were included with the TMP install work.

I don’t know what would cause this behavior though.

1 Like

Well, for anyone else stumbling across this, I figured it out. There is a special folder that my fonts must be placed in.

Thanks

20 Likes

thank you for this!

1 Like

The location of where these TMP resources should be located is defined in the TMP Settings where by default for font asset it is in “Resource/Fonts & Materials/…”

4 Likes

Thanks!! This is answer I am finding

1 Like

I would like to add on this, it has to be TMP pro text field. If this isnt working for you please check that if you are using old text like in my case( most things worked on old text like color, size etc. but font).

Could this please be added to the documentation? A google search eventually took me here but it’s not at all obvious from this page.
https://docs.unity3d.com/Packages/com.unity.textmeshpro@4.0/manual/RichTextFont.html

1 Like

Took me a little while before i found this. it saved my butt

1 Like

Just an addition: if in your settings you have (Resources/)Fonts/, but in your project structure you have another folder before the text asset (for example the project relative path would be Assets/Resources/Fonts/MyFonts/font.asset), then you have seem to have to include the subfolder in the tag, as adding it in the path in settings won’t work. So your tag would be <font="MyFonts/font">