I created two TMP font assets with the TMPro Font Asset Creator, then used one as a default in a TMP text area, then add a font tag into the text, e.g. …
magna sit amet venenatis volutpat, enim sapien fermentum augue, ac commodo nisl ex interdum libero. <font=“MyFont Alt”>Morbi id dui lectus. Nullam metus lorem, viverra eget ipsum vel, sodales ultricies enim. Sed venenatis rutrum viverra.
But the inserted font tag is not working. It seems TMPro normally adds a submesh object as child but it doesn’t do in my case and manually adding a child object and add a tmp submesh to it won’t do as I can’t change the material fields.
What do I need to do to get this working?
Nevermind! I had to change the path to font resources in the TMP global settings.
Since resources have to be loaded at runtime, your font assets, sprite assets, material presets and gradient presets have to be located in a Resources folder. As you have discovered and for better organizational structure, you can define where in a Resources folder TMP can expect to find these.
See the following as well http://digitalnativestudios.com/textmeshpro/docs/rich-text/#font
1 Like
Step 01: Download Font
-----------------------------------
open the link https://fonts.google.com/ . Click right on corner Browse fonts click. and type the font in search box.
Font List
- Noto Sans [find On Google fonts]
- Roboto [find On Google fonts] 3)
- Code2000 [But it’s not open source.]
- Futura
- Arial
Download Family for your favorite font.
Step 02: Install TextMeshPro plugin
from Package manager. After copy the font file NotoSans-Regular.ttf and paste to this directory. [Ex. Asset > TextMesh Pro > Resources > Fonts & Materials > paste NotoSans-Regular.ttf file]
Step 03: Create SDF for font. if any one
- Select NotoSans-Regular.ttf file and create font asset SDF from menu bar Assets > Create > TextMeshPro > Font Asset OR
- Short Cut-> Shift + Ctrl + F12 OR
- Select NotoSans-Regular.ttf file and click mouse right button and create SDF from Create > TextMeshPro > Font Asset
Step 04: Add Other font SDF in to your primary or existing font SDF.
----------------------------------------------------------------------------------------------------------
Select primary font SDF and show the inspector go to Fallback Font Assets. Added the NotoSans-Regular SDF in to Fallback list. [Multiple fonts added in to primary font SDF]
1 Like