less than 1 minute read

Use TextMeshPro’s “Font Weights” feature + stylesheets to simplify working with specs set by the design team.

Font Weights

When you import a family of fonts, don’t explicitly reference them all in the TMP components. Instead, make the Regular font style reference all the variations.

tmp-stylesheets2

Stylesheets

Create a stylesheet to add snippets for each weight (300, 400, etc.), or any other combination of markdown tags.

tmp-stylesheets4

These will appear in the “Text Style” dropdown right below the text.

tmp-stylesheets3

To get started, open the Asset menu and go to Create -> TextMeshPro -> Style Sheet

tmp-stylesheets5

After customizing the stylesheet, set both the font and stylesheet as defaults in TextMeshPro PlayerSettings.

tmp-stylesheets1

Comments