Define typographic roles for your project and apply them consistently across every text component.
A Font Palette is a ScriptableObject that defines a set of named typographic roles—think of them as CSS classes for fonts. Instead of setting font size, spacing, and color on every text object individually, you assign a role like Header, Body, or Caption and let the palette control the details.
Each role specifies:
| Property | Type | Description |
|---|---|---|
| Role Name | string |
Unique identifier for the role (e.g. "Header", "Body"). |
| TMP Font Asset | TMP_FontAsset |
The TextMeshPro font asset used for this role. |
| Legacy Font | Font (optional) |
Optional Unity legacy font, for UI Text components. |
| Font Style | FontStyles |
Normal, Bold, Italic, or Bold Italic. |
| Font Size | float (px) |
Base font size in pixels. |
| Character Spacing | float |
Extra spacing between individual characters. |
| Line Spacing | float |
Vertical spacing between lines of text. |
| Word Spacing | float |
Extra spacing between words. |
| Paragraph Spacing | float |
Extra spacing between paragraphs. |
| Color | Color |
Default text color for this role. |
There are two ways to create a new palette:
Select a palette to open the role editor. The left panel lists every role defined in the palette; the right panel shows the editable properties of the selected role.
Palettes can be shared across projects or with teammates using JSON files.
FontPalette ScriptableObject is created in your project with all the roles from the file.You can create as many palettes as you need. Common use cases include:
Switch the active palette at any time using the palette dropdown in the My Fonts → Palettes toolbar. Only one palette is active at a time; the active palette is used by the compliance checker and the Apply to Scene tools.
You can query palette data at runtime or in editor scripts through the
FontPalette API.
// Returns the FontRoleEntry matching the given name, or null if not found.
FontRoleEntry role = palette.GetRole("Header");
// Returns a list of every TMP_FontAsset referenced by the palette's roles.
List<TMP_FontAsset> fonts = palette.GetAllTmpFonts();
// Returns a list of every legacy Font referenced by the palette's roles.
List<Font> fonts = palette.GetAllLegacyFonts();