A game about forced loneliness, made by TACStudios
1 2 3<a name="index.md"></a> 4# TextMesh Pro Documentation 5 6TextMesh Pro is a set of Unity tools for 2D and 3D text. 7 8[IMAGE] 9 10TextMesh Pro provides better control over text formatting and layout than to Unity's UI Text & Text Mesh systems. It includes features such as: 11 12* Character, word, line and paragraph spacing. 13* Kerning. 14* Justified text. 15* Links. 16* More than thirty rich text tags. 17* Support for multiple fonts. 18* Support for sprites. 19* Custom styles. 20* Advanced text rendering using custom [shaders](Shaders.md). 21 22## Getting started 23 24The TextMesh Pro package is included in the Unity Editor. You do not need to install it. 25 26You can switch to other versions of TextMesh Pro from the [Packages Window](https://docs.unity3d.com/Manual/upm-ui.html). 27 28To use TextMesh Pro, you must import the TMP Essential Resources package (see the next section). 29 30You can also import the TMP Examples & Extras package to help you learn TextMesh Pro. 31 32### Importing required resources into projects 33 34To use TextMesh Pro in your projects, you need to import the **TMP Essential Resources**. 35 36- From the menu, select **Window > TextMeshPro > Import TMP Essential Resources** 37 38This adds the essential resources to the **TextMesh Pro** folder in the Project. 39 40### Importing examples and additional resources 41 42TextMesh Pro also includes additional resources and examples to help you learn about various features. 43 44You can import these into your projects as well. 45 46- From the menu, select **Window > TextMeshPro > Import TMP Examples & Extras** 47 48This adds the examples and additional resources to the **TextMesh Pro > Examples & Extras** folder in the Project. 49 50Installing the TMP Examples & Extras is not mandatory, but is strongly recommended for first-time TextMesh Pro users. 51 52 53---- 54_NEW FILE:_ TMPObjects.md 55 56 57<a name="TMPObjects.md"></a> 58# Creating text 59 60To create text, add TextMesh Pro GameObjects to a Scenes. There are two types of TextMesh Pro GameObject: 61 62- [TextMesh Pro UI Text GameObjects](TMPObjectUIText.md) use [Unity's UI system](https://docs.unity3d.com/Manual/UISystem.html), and are designed for use on a [Canvas](https://docs.unity3d.com/Manual/UICanvas.html). 63 64- [TextMesh Pro 3D Text GameObjects](TMPObject3DText.md) behave like regular 3D GameObjects in the Scene. 65 66 67## TextMesh Pro UI Text GameObjects 68 69TextMesh Pro UI text objects use [Unity's UI system](https://docs.unity3d.com/Manual/UISystem.html). When you create one, it is placed on a [Canvas](https://docs.unity3d.com/Manual/UICanvas.html) in the Scene. If the Scene does not have a canvas, Unity creates one automatically when you create the TexMesh Pro UI text GameObject. 70 71**To create a new TextMesh Pro UI Text GameObject:** 72 731. From the menu, choose **GameObject > UI > TextMesh Pro - Text**. 741. In the **TextMesh Pro (UGUI)** Inspector, enter your text. 751. Adjust the [UI text properties](TMPObjectUIText.md) as needed. 76 77### Other TextMesh Pro UI GameObjects 78 79In addition to the UI text GameObject, you can create TextMesh Pro **Dropdown** and **Input Field** components from the **GameObject > UI** menu. 80 81These components are nearly identical to regular Unity UI components, but have a few key differences: 82 83* The TextMesh Pro Dropdown GameObject uses [TextMesh Pro font assets](FontAssets.md) instead of regular Unity font assets. <br/><br/> For more information about Unity dropdowns, see the [Dropdown](https://docs.unity3d.com/Manual/script-Dropdown.html) documentation in the Unity manual. <br/><br/> 84* The TextMesh Pro Input Field GameObject uses uses [TextMesh Pro font assets](FontAssets.md) instead of regular Unity font assets, and has more options for defining the input field. <br/><br/> For more information about Unity input fields, see the [Input Field](https://docs.unity3d.com/Manual/script-InputField.html) documentation in the Unity manual. 85 86## TextMesh Pro 3D Text GameObjects 87 88TextMesh Pro 3D text objects are nearly identical to their UI counterparts, but rather than being positioned on a Canvas, they behave like regular 3D objects in the Scene. 89 90**To create a new TextMesh Pro 3D Text GameObject:** 91 921. From the menu, choose **GameObject > 3D GameObject > TextMesh Pro - Text**. 931. In the **TextMesh Pro** Inspector, enter your text. 941. Adjust the [3D text properties](TMPObject3DText.md) as needed. 95 96 97---- 98_NEW FILE:_ TMPObjectUIText.md 99 100 101<a name="TMPObjectUIText.md"></a> 102## UI Text GameObjects 103 104By default, a TextMesh Pro UI Text GameObject has the following components: 105 106* **Rect Transform:** Controls the GameObject's position and size on the canvas. For more information, see the [Rect Transform](https://docs.unity3d.com/Manual/class-RectTransform.html) documentation in the Unity Manual.<br/><br/> 107* **Canvas Renderer:** Renders the GameObject on the canvas. For more information, see the [Canvas Renderer](https://docs.unity3d.com/Manual/class-CanvasRenderer.html) documentation in the Unity Manual.<br/><br/> 108* **TextMesh Pro UGUI (Script):** Contains the text to display, and the properties that control its appearance and behavior. These properties are described [below](properties).<br/><br/> 109* **Material:** A Unity material that uses one of the TextMesh Pro shaders to further control the text's appearance. For more information see the [Shaders](Shaders.md) section. 110 111### Properties Overview 112 113![Example image](../images/TMP_Object_UIInspector.png) 114 115[!include[](include-tmpobject-legend.md)] 116 117[!include[](include-tmpobject-text.md)] 118 119[!include[](include-tmpobject-main-settings.md)] 120 121[!include[](include-tmpobject-font.md)] 122 123[!include[](include-tmpobject-color.md)] 124 125[!include[](include-tmpobject-spacing.md)] 126 127[!include[](include-tmpobject-alignment.md)] 128 129[!include[](include-tmpobject-wrapping.md)] 130 131[!include[](include-tmpobject-uv-mapping.md)] 132 133[!include[](include-tmpobject-extra-settings-ui.md)] 134 135 136 137---- 138_NEW FILE:_ TMPObject3DText.md 139 140 141<a name="TMPObject3DText.md"></a> 142## 3D Text GameObjects 143 144By default, a TextMesh Pro 3D Text GameObject has the following components: 145 146* **Rect Transform:** Controls the GameObject's position and size. For more information, see the [Rect Transform](https://docs.unity3d.com/Manual/class-RectTransform.html) documentation in the Unity Manual. 147 148> [!NOTE] 149> **Note:** If you want to use the Rect Transform component's anchoring system, the TextMesh Pro component's parent GameObject must also have a Rect Transform component. 150 151* **Mesh Renderer:** Renders the GameObject. For more information, see the [Mesh Renderer](https://docs.unity3d.com/Manual/class-MeshRenderer.html) documentation in the Unity Manual. 152* **TextMesh Pro UGUI (Script):** Contains the text to display, and the properties that control its appearance and behavior. These properties are described [below](#properties). 153* **Material:** A Unity material that uses one of the TextMesh Pro shaders to further control the text's appearance. For more information see the [Shaders](Shaders.md) section. 154 155### Properties Overview 156 157![Example image](../images/TMP_Object_3DInspector.png) 158 159[!include[](include-tmpobject-legend.md)] 160 161[!include[](include-tmpobject-text.md)] 162 163[!include[](include-tmpobject-main-settings.md)] 164 165[!include[](include-tmpobject-font.md)] 166 167[!include[](include-tmpobject-color.md)] 168 169[!include[](include-tmpobject-spacing.md)] 170 171[!include[](include-tmpobject-alignment.md)] 172 173[!include[](include-tmpobject-wrapping.md)] 174 175[!include[](include-tmpobject-uv-mapping.md)] 176 177[!include[](include-tmpobject-extra-settings-3d.md)] 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193---- 194_NEW FILE:_ FontAssets.md 195 196 197<a name="FontAssets.md"></a> 198# Font Assets 199 200To use different fonts with TextMesh Pro, you need to create font assets. TextMesh Pro has its own font Asset format that is distinct from, but related to, [Unity's regular font Asset format](https://docs.unity3d.com/2019.1/Documentation/Manual/class-Font.html). You create TextMesh Pro font assets _from_ Unity font assets. 201 202Every TextMesh Pro font Asset has two sub-assets: 203 204* **Font atlas:** a black and white or grayscale texture file that contains all of the characters included in the font Asset.<br/><br/>![Example image](../images/FontAtlasExample.png)<br/>_Example of a font atlas_ <br/><br/> 205* **Font material:** a material that controls the appearance of TextMesh Pro text using one of the [TextMesh Pro shaders](Shaders.md). 206 207Font assets must be stored in a specific folder, defined in the **Default Font Asset > Path** option of the [TextMesh Pro settings](Settings.md).This ensures that TextMesh Pro can find them and that they are included in builds. 208 209 210## Creating Font Assets 211 212There are two ways to create a TextMesh Pro font Asset: 213 214* Select a Unity font Asset and choose **Asset > Create > TextMeshPro > Font Asset** from Unity's main menu or press **Ctrl/Cmd + Shift + F12**.<br/><br/>This creates an empty, font Asset, meaning its font atlas does not yet include any characters. 215 216 217* Using the TexMesh Pro [Font Asset Creator](FontAssetsCreator.md), a tool for creating and updating TextMesh Pro font assets. 218 219 220## Types of font atlas 221 222When you generate a font Asset you can choose what type of font atlas texture to render from the **Font Settings > Render Mode** dropdown in the Font Asset Creator. 223 224* **Distance Field:** Use these options to render font atlases containing [signed distance field (SDF)](FontAssetsSDF.md) information.<br/><br/>This is the recommended mode for most applications because SDF atlases produce text that is smooth when transformed. 225 226* **Smooth/Hinted Smooth:** These options render antialiased bitmap textures. The Hinted version aligns glyph pixels with texture pixels to produce a smoother result.<br/><br/>This mode works well for static text that will be viewed head on, with a good correspondence between texture pixels and screen pixels. Transforming the text produces blurry edges. 227 228* **Raster/Raster Hinted:** These options render un-smoothed bitmap textures. These will almost always produce text with jagged, pixellated edges. The Hinted version aligns glyph pixels with texture pixels to produce a smoother result. 229 230 231---- 232_NEW FILE:_ FontAssetsProperties.md 233 234 235<a name="FontAssetsProperties.md"></a> 236## Font Asset Properties 237 238 239### Properties 240 241![Example image](../images/TMP_FontAsset_Inspector.png) 242 243Properties are divided into the following sections: 244 245![Example image](../images/Letter_A_half.png) **[Face Info](#FaceInfo):** 246 247![Example image](../images/Letter_B_half.png) **[Generation Settings](#generation-settings):** 248 249![Example image](../images/Letter_B_half.png) **[Atlas & Material](#AtlasAndMaterial):** 250 251![Example image](../images/Letter_C_half.png) **[Font Weights](#FontWeights):** 252 253![Example image](../images/Letter_D_half.png) **[Fallback Font Assets](#FallbackFontAssets):** 254 255![Example image](../images/Letter_E_half.png) **[Glyph Table](#GlyphTable):** 256 257![Example image](../images/Letter_F_half.png) **[Glyph Adjustment Table](#GlyphAdjustmentTable):** 258 259<a name="FaceInfo"></a> 260#### Face Info 261 262The Face Info properties allow you to control the font's line metrics. They also include a few read-only properties that are generated when you create the font Asset. 263 264![Example image](../images/TMP_FontAssetLineMetrics.png) 265_Line metrics_ 266 267|Property:|Function:| 268|-|-| 269|**Update Texture Atlas**|Open the [Font Asset Creator](FontAssetsCreator.md) pre-configured to modify and regenerate this font Asset.| 270|**Family Name**|The name of the font used to create this font Asset.<br/><br/>TextMesh Pro sets this value when you generate the font Asset. You cannot change it manually.| 271|**Style Name**|The style of the font used to create this font Asset. For example, **Regular**, **Bold**, **Italic**, and so on.<br/><br/>TextMesh Pro sets this value when you generate the font Asset. You cannot change it manually.| 272|**Point Size**|The font size in points.<br/><br/>TextMesh Pro bakes this value into the atlas texture when you generate the font Asset. You cannot change it manually.| 273|**Scale**|Scales the font by this amount. For example, a value of **1.5** scales glyphs to 150% of their normal size.| 274|**Line Height**|Controls the distance between the tops of consecutive lines.<br/><br/>If you set a line height greater than the sum of the **Ascent Line** and **Descent Line** values, it creates in a gap between lines.<br/><br/>If you set a line height greater than the sum of the **Ascent Line** and **Descent Line** values, characters on different lines might overlap.| 275|**Ascent Line**|Controls the maximum distance that glyphs can extend above the baseline. It corresponds to the top of a line.| 276|**Cap Line**|Controls the distance between the base line and the tops of uppercase glyphs.| 277|**Mean Line**|Controls the maximum height for non-ascending lowercase glyphs (for example. "a" and "c", but not "b" and "d," which have ascenders).<br/><br/>The tops of rounded glyphs sometimes extend a slightly above the mean line.| 278|**Baseline**|Controls the height of the baseline.<br/><br/>The baseline is the horizontal line that characters sit on.| 279|**Descent Line**|Controls the maximum distance that glyphs can extend below the baseline.| 280|**Underline Offset**|Controls the position of underlines relative to the baseline.| 281|**Underline Thickness** | Controls the thickness of underlines. | 282|**Strikethrough Offset**|Controls the position of strikethrough lines relative to the baseline.| 283|**Superscript Offset**| Offsets superscript text from the baseline.| 284|**Superscript Size**|Scales superscript text relative to the normal font size.| 285|**Subscript Offset**| Offsets subscript text from the baseline.| 286|**Subscript Size**|Scales subscript text relative to the normal font size.| 287| **Tab Width** | Specifies the width of a TAB character. | 288 289#### Generation Settings 290 291<br/><br/>These values are set when you generate the font Asset.<br/><br/>When the **Atlas Population Mode** is set to **Dynamic**, you can change the atlas size without regenerating the atlas. 292 293|Property:||Function:| 294|-|-|-| 295|**Source Font File** || | 296|**Atlas Population Mode** || | 297| |Dynamic| | 298| |Static| | 299|**Atlas Render Mode** || | 300||SMOOTH|Renders the atlas to an antialiased bitmap.| 301||RASTER|Renders the atlas to a non-antialiased bitmap.| 302||SMOOTH_HINTED|Renders the atlas to an antialiased bitmap, and aligns character pixels with texture pixels for a crisper result.| 303||RASTER_HINTED|Renders the atlas to a non-antialiased bitmap and aligns character pixels with texture pixels for a crisper result.| 304| |SDF| Renders the atlas using a slower, but more accurate SDF generation mode, and no oversampling. | 305| |SDFAA| Renders the atlas using a faster, but less accurate SDF generation mode. It produces font atlases that are sufficient for most situations.| 306| |SDFAA_HINTED| Renders the atlas using a faster, but less accurate SDF generation mode, and aligns character pixels with texture pixels for a crisper result.. It produces font atlases that are sufficient for most situations | 307| |SDF8| Renders the atlas using a slower, but more accurate SDF generation mode, and 8x oversampling. | 308| |SDF16| Renders the atlas using a slower, but more accurate SDF generation mode, and 16x oversampling. | 309| |SDF32| Renders the atlas using a slower, but more accurate SDF generation mode, and 32x oversampling. Use this setting for fonts with complex or small characters. | 310|**Sampling Point Size** || The size, in points, of characters in the font texture. | 311|**Padding**||The amount of padding between characters in the font atlas texture.<br/><br/>This value is set when you generate the font Asset, and is not editable.| 312|**Atlas Width/Height**||The width and height the font atlas texture.<br/><br/>Choose for each dimension, choose one of the available values from the drop-down menu.| 313 314 315<a name="AtlasAndMaterial"></a> 316#### Atlas & Material 317 318This section lists the sub-assets created when you generated the font Asset. You should not edit these directly. 319 320|Property:|Function:| 321|-|-| 322|Font Atlas|The font texture atlas created when you generated the font Asset.| 323|Font Material|The font material created when you generated the font Asset.| 324 325<a name="FontWeights"></a> 326#### Font Weights 327 328The Font Weights options allow you to control the appearance of bold and italicized text. There are two ways of doing this: 329 3301. Create different bold and italic variants of the font Asset, and add them to the Font Table.<br/><br/>You can specify regular and italic fonts for weights ranging from 100 (Thin) to 900 (Black). 331 3321. Define "fake" bolding and italicization by setting the **Font Weight > Italic Style** and **Bold Weight** properties.<br/><br/>These settings tell TextMesh Pro how to treat the current font Asset when you bold or italicize text. 333 334 335|Property:||Function:| 336|-|-|-| 337|Font Table||Specify font assets to use for the following font variants.<br/><br/>100 - Thin<br/>200 - Extra-Light<br/>300 - Light<br/>400 - Regular (italic only)<br/>500 - Medium<br/>600 - Semi-Bold<br/>700 - Bold<br/>800 - Heavy<br/>900 - Black <br/><br/> &ast; **400 - Regular > Regular Typeface** is the current font Asset. You cannot change it.<br/><br/> If you don't specify font assets, TextMesh Pro "fakes" bolding and italicization according to the rest of the the **Font Weights** settings. <br/><br/> Practically speaking, this limits you to regular and italic versions of normal and bold text (equivalent to weights of 400 and 700 respectively). | 338||Italic Style|Choose a font Asset to use for italic style.| 339||Regular Typeface|The regular font Asset that you created using the Font Asset Creator. You cannot change this Asset.| 340||Italic Style|Choose a font Asset to use for italic style.<br/><br/>If you don’t specify a font Asset, TextMesh Pro “fakes” italics slanting the character sprites in the **Normal Style** font Asset by an amount defined in the **Italic Style** setting.| 341|**400 - Regular**||| 342||Regular Typeface|The regular font Asset that you created using the Font Asset Creator. You cannot change this Asset.| 343||Italic Style|Choose a font Asset to use for italic style.<br/><br/>If you don’t specify a font Asset, TextMesh Pro “fakes” italics slanting the character sprites in the **Normal Style** font Asset by an amount defined in the **Italic Style** setting.| 344|**700 - Bold**||| 345||Regular Typeface|Choose a font Asset to use for bold style.<br/><br/>If you don’t specify a font Asset, TextMesh Pro bolds character sprites in the **Normal Style** font Asset according to the **Bold Weight** setting.| 346||Italic Style|Choose a font Asset to use for bold italicized style.<br/><br/>If you don’t specify a font Asset, TextMesh pro bolds and slants the character sprites in the **Normal Style** font Asset according to the **Bold Weight** and **Italic Style** settings respectively.| 347|**Normal Weight**||Set the regular font weight to use when no font Asset is available.| 348|**Bold Weight**||Set the bold font weight assumed when no font Asset is available.| 349|**Spacing Offset**||Add space between characters when using the normal text style.| 350|**Bold Spacing**||Add space between characters when using the fake bold text style (meaning you haven’t specified a Bold font Asset).| 351|**Italic Style**||If you don’t specify a font Asset for **400 - Regular > Italic Style** variant, TextMeshPro slanting the character sprites in the Normal Style font Asset by an amount defined in the **Italic Style** setting.<br/><br/>Set this value to control the | 352|**Tab Multiple**||Set the tab size. This value is multiplied by the width of the font's space character to calculate the tab size used.| 353 354<a name="FallbackFontAssets"></a> 355#### Fallback Font Assets 356 357Each font Asset contains a limited number of characters. When the font you’re using is missing a glyph, TextMesh Pro searches the fallback font list until it finds a font Asset that includes it. The text object then uses that font to render the character. 358 359You can use this feature to distribute fonts over multiple textures, or use different fonts for specific characters. However, keep in mind that searching the list for missing characters requires extra computing resources, and that using additional fonts requires additional draw calls. 360 361|Property:|Function:| 362|-|-| 363|**Fallback Font Asset list**|Manage the fallback fonts for this font Asset.<br/><br/>Click **+** and **-** to add and remove font slots.<br/><br/>Click the circle icon next to a font to open an Object Picker where you can choose a font Asset.<br/><br/>Drag the handles on the left side of any font Asset to reorder the list.| 364 365<a name="GlyphTable"></a> 366#### Glyph Table 367 368|Property:||Function:| 369|-|-|-| 370|**Glyph Search**||Search the character list by character, ASCII value, or Hex value.<br/><br/>Search results are ordered by ASCII value, lowest to highest.| 371|**Previous Page/Next Page**||Long character lists are split into pages, which you can navigate using these buttons (also located at the bottom of the section).| 372|**Glyph Properties**||Displays a single glyph’s properties. Each glyph has its own entry.<br/><br/>Click an entry to make it active. You can then edit the glyph, copy it, or remove it from the list.| 373||Ascii|Displays the character’s ASCII decimal value.| 374||Hex|Displays the character’s Unicode Hex value.| 375||Char|Displays the character.| 376||X, Y, W, H|Define the rectangular area the character occupies in the font atlas.| 377||OX, OY|Control the placement of the character's sprite, defined at its top-left corner relative to its origin on the baseline.| 378||ADV|Specify how far to advance along the baseline before placing the next character.| 379||SF|Change this scaling factor value to adjust the size of the character.| 380|**Copy to**||Duplicate this glyph.<br/><br/>To make a copy, enter an unused Unicode (Hex) ID in the text field and click **Copy to**.| 381|**Remove**||Remove this glyph from the list.| 382 383<a name="GlyphAdjustmentTable"></a> 384#### Glyph Adjustment Table 385 386The glyph adjustment table controls spacing between specific pairs of characters. Some fonts include kerning information, which is imported automatically. You can add kerning paris for fonts that don’t include them. 387 388|Property:||Function:| 389|-|-|-| 390|**Adjustment Pair Search**||Search the adjustment table by character or ASCII value.<br/><br/>Search results include entries where either the left or right character matches the search string.<br/><br/>Search results are ordered by the ASCII value of the left character, lowest to highest.| 391|**Previous Page/Next Page**||Long adjustment tables are split into pages, which you can navigate using these buttons (also located at the bottom of the section).| 392|**Glyph Properties**||Displays a single glyph’s properties. Each glyph has its own entry.<br/><br/>Click an entry to make it active. You can then edit the glyph, copy it, or remove it from the list.| 393||Char (left and right)|Display the left and right characters for the kerning pair.<br/><br/>When you add anew kerning pair, you can specify the left and right characters to use by typing them in these fields.| 394||ID (left and right)|Display the left and right characters’ ASCII decimal values.<br/><br/>When you add anew kerning pair, you can specify the left and right characters to use by typing their ASCII values in these fields.| 395||OX, OY|For each character in the kerning pair, set the horizontal (**X**) and vertical (**Y**) offset relative to the character's initial position.| 396||AX|For each character in the kerning pair, specify how far to advance along the baseline before placing the next character.<br/><br/>Practically speaking, the left **AX** value controls the distance between the characters in the kerning pair, while the right **AX** value controls the distance between the kerning pair and the next character.| 397|**Add New Kerning Pair**||Add a new entry to the Glyph Adjustment Table.<br/><br/>You cannot duplicate an existing entry.| 398 399 400---- 401_NEW FILE:_ FontAssetsCreator.md 402 403 404<a name="FontAssetsCreator.md"></a> 405### Font Asset Creator 406 407The Font Asset Creator converts [Unity font assets](FontAssets.md) into TextMesh Pro font assets. You can use it to create both Signed [Distance Field (SDF)](FontAssetsSDF.md) fonts and bitmap fonts. 408 409When you create a new font Asset, TextMesh Pro generates the Asset itself, as well as the atlas texture and material for the font. 410 411After you create a TextMesh Pro font Asset, you can delete the Unity font Asset you used as a source, although you may want to keep it in the Scene in case you need to regenerate the TextMesh Pro font Asset. 412 413### Creating a font Asset 414 415Before you start, make sure that you've already imported the font (usually a TrueType .ttf file) you want to use into the project. For more information about importing fonts into Unity, see the documentation on [Fonts](https://docs.unity3d.com/Manual/class-Font.html) in the Unity manual. 416 417**To create a TextMesh Pro font Asset:** 418 4191. From the menu, choose: **Window > TextMesh Pro > Font Asset Creator** to open the Font Asset Creator. 420 4211. Choose a **Source Font File**. This the Unity font Asset that you want to convert into a TextMesh Pro font Asset. 422 4231. Adjust the **[Font Settings](#FontAssetCreatorSettings)** as needed, then click **Generate Font Atlas** to create the atlas texture<br/><br/>The atlas, and information about the font Asset appear in the texture preview area.<br/><br/>IMAGE 424 4251. Continue adjusting the settings and regenerating the atlas until you're satisfied with the result. 426 4271. Click **Save** or **Save as...** to save the font Asset to your project.<br/><br/>You must save the Asset to a **Resources** folder to make it accessible to TextMesh Pro. 428 429<a name="FontAssetCreatorSettings"></a> 430### Font Asset Creator Settings: 431 432|Property:||Function:| 433|-|-|-| 434|**Source Font File**||Select a font from which to generate a Text Mesh Pro font Asset.<br/><br/>This font is not included in project builds, unless you use it elsewhere in the project, or put it in a Resources folder.<br/><br/>You can use one of the default TextMesh Pro font assets, or [import your own](https://docs.unity3d.com/Manual/class-Font.html).| 435|**Sampling Point Size**||Set the font size, in points, used to generate the font texture.| 436|**Auto Sizing**||Use the largest point size possible while still fitting all characters on the texture.<br/><br/>This is the usual setting for SDF fonts.| 437|**Custom Size**||Use a custom point size. Enter the desired size in the text box.<br/><br/>Use this setting to achieve pixel-accurate control over bitmap-only fonts.| 438|**Padding**||Specify the space, in pixels, between characters in the font texture.<br/><br/>Padding provides the space required to render character separately, and to generate the SDF gradient (See the documentation on [Font Assets](FontAssetsSDF.md) for details).<br/><br/>The larger the padding, the smoother the transition, which allows for higher-quality rendering and larger effects, like thick outlines.<br/><br/>A padding of 5 is often fine for a 512x512 texture.| 439|**Packing Method**||Specify how to fit the characters into the font texture.| 440||Optimum|Finds the largest possible automatic font size that still fits all characters in the texture.<br/><br/>Use this setting to generate the final font texture. 441||Fast|Computes character packing more quickly, but may use a smaller font size than Optimum mode.<br/><br/>Use this setting when testing out font Asset creation settings.| 442|**Atlas Resolution**||Set the size width and height of the font texture, in pixels.<br/><br/>A resolution of 512 x 512 is fine for most fonts, as long as you are only including ASCII characters. Fonts with more characters may require larger resolutions, or multiple atlases. <br/><br/>When using an SDF font, a higher resolution produces finer gradients, and therefore higher quality text.| 443|**Character Set**||The characters in a font file aren't included in the font Asset automatically. You have to specify which ones you need. You can select a predefined character set, provide a list of characters to include, or include all of the characters in an existing font Asset or text Asset.| 444||ASCII|Includes the visible characters in the ASCII character set.| 445||Extended ASCII|Includes the visible characters in the extended ASCII character set.| 446||ASCII Lowercase|Includes only visible lower-case characters from the ASCII character set.| 447||ASCII Uppercase|Includes only visible upper-case characters from the ASCII character set.| 448||Numbers + Symbols|Includes only the visible numbers and symbols from the ASCII character set.| 449||Custom Range|Includes a range of characters that you define.<br/><br/>Enter a sequence of decimal values, or ranges of values, to specify which characters to include.<br/><br/>Use a hyphen to separate the first and last values of a range. Use commas to separate values and ranges (for example `32-126,160,8230`).<br/><br/>You can also choose an existing font Asset to include the characters in that Asset.| 450||Unicode Range (Hex)|Includes a range of characters that you define.<br/><br/>Enter a sequence of unicode hexadecimal values, or ranges of values, to specify which characters to include.<br/><br/>Use a hyphen to separate the first and last values of a range. Use commas to separate values and ranges (for example `20-7E,A0,2026`).<br/><br/>You can also choose an existing font Asset to include the characters in that Asset.| 451||Custom Characters|Includes a range of characters that you define.<br/><br/>Enter a sequence of characters to specify which characters to include.<br/><br/>Enter characters one after the other, with no spaces or delimiting characters in between (for example `abc123*#%`).<br/><br/>You can also choose an existing font Asset to include the characters in that Asset.| 452||Characters from File|Includes all the characters in a text Asset that you specify.<br/><br/>Use this option when you want to save your character set.| 453|**Font Style**||Apply basic font styling when creating a bitmap-only font Asset.<br/><br/>For SDF fonts, you configure the styling in the shader rather than the font Asset.| 454||Normal|Generates characters with no styling.| 455||Bold, Italic, Bold_Italic|Generates the font Asset with bold characters, italicized characters, or both.<br/><br/>With these settings, you can set a strength value that applied to bolding and italicization| 456||Outline|Generates the font Asset with outline characters.| 457||Bold_Sim|Generates the font Asset with a simulated bold.| 458|**Render Mode**||Specify the render mode to use when outputting the font atlas.| 459||SMOOTH|Renders the atlas to an antialiased bitmap.| 460||RASTER|Renders the atlas to a non-antialiased bitmap.| 461||SMOOTH_HINTED|Renders the atlas to an antialiased bitmap, and aligns character pixels with texture pixels for a crisper result.| 462||RASTER_HINTED|Renders the atlas to a non-antialiased bitmap and aligns character pixels with texture pixels for a crisper result.| 463| |SDF| Renders the atlas using a slower, but more accurate SDF generation mode, and no oversampling. | 464| |SDFAA| Renders the atlas using a faster, but less accurate SDF generation mode. It produces font atlases that are sufficient for most situations.| 465| |SDFAA_HINTED| Renders the atlas using a faster, but less accurate SDF generation mode, and aligns character pixels with texture pixels for a crisper result.. It produces font atlases that are sufficient for most situations | 466| |SDF8| Renders the atlas using a slower, but more accurate SDF generation mode, and 8x oversampling. | 467| |SDF16| Renders the atlas using a slower, but more accurate SDF generation mode, and 16x oversampling. | 468| |SDF32| Renders the atlas using a slower, but more accurate SDF generation mode, and 32x oversampling. Use this setting for fonts with complex or small characters. | 469|**Get Kerning Pairs**||Enable this option to copy the kerning data from the font.<br/><br/>Kerning data is used to adjust the spacing between specific character pairs to produce a more visually pleasing result.<br/><br/>**Note:** It isn't always possible to import kerning data. Some fonts store kerning pairs in their glyph positioning (GPOS) table, which is not supported by FreeType, the font engine used by TextMesh Pro. Other fonts do not store kerning pairs at all.| 470|**Generate Font Atlas**||Generate the font atlas texture.| 471|**Save**||Save the current font atlas.| 472|**Save As**||Save the current font atlas as a new font Asset.| 473 474### Tips for creating font assets 475 476 477 478 479 480 481 482 483 484 485Characters in the font texture need some padding between them so they can be rendered separately. This padding is specified in pixels. 486Padding also creates room for the SDF gradient. The larger the padding, the smoother the transition, which allows for higher-quality rendering and larger effects, like thick outlines. A padding of 5 is often fine for a 512x512 texture. 487 488 489For most fonts, a 512x512 texture resolution is fine when including all ASCII characters. 490When you need to support thousands of character, you will have to use large textures. But even at maximum resolution, you might not be able to fit everything. In that case, you can split the characters by creating multiple font assets. Put the most often used characters in a main font Asset, and the others in a fallback font assets. 491 492 493---- 494_NEW FILE:_ FontAssetsLineMetrics.md 495 496 497<a name="FontAssetsLineMetrics.md"></a> 498## Line metrics. 499 500TextMesh Pro sets line metrics automatically when you generate a font Asset. 501 502If the generated values produce strange or incorrect results, you can tweak the line metrics settings to fine-tune the font. 503 504Most line metric values are relative to the **Baseline**, which is the horizontal line that characters sit on. 505 506- Values for above-the-baseline metrics, such as the **Ascender** height, are greater that the **Baseline** value. 507- Values for below-the-baseline metrics, such as the **Descender** height, are less than **Baseline** value. 508 509![Example image](../images/TMP_LineMetrics.png) 510 511|Metric:|Function:| 512|-|-| 513|**Line Height**|The distance between the tops of consecutive lines.<br/><br/>If you set the line height to a value greater than the combined size of the **Ascender** and **Descender**, it creates a gap between lines.<br/><br/>If you set a line height to a value less than the combined size of the ascender and descender results in potential overlap between characters on different lines.| 514|**Ascender**|The ascender height, which specifies how far characters can extend above the baseline. It corresponds to the top of a line.| 515|**Cap Height**|The height of capital letters from the baseline.| 516|**Baseline**|The baseline height.<br/><br/>The baseline is the horizontal line that characters sit on.| 517|**Descender**|The descender height, which specifies how far characters can extend below the baseline.| 518|**Underline Offset**|The position of underlines relative to the baseline.| 519|**Strikethrough Offset**|The position of strikethrough lines relative to the baseline.| 520|**Superscript/ Subscript Offset**|Adjust the baseline for superscript and subscript text.| 521|**Super/ Subscript Size**|The scale of superscript and subscript text relative to the normal font size.| 522|**Padding**|The amount of padding between characters in the font atlas texture.<br/><br/>TextMesh Pro sets this value when you generate the font Asset. It is not editable.| 523|**Width/Height**|The font atlas texture's width and height, in pixels.<br/><br/>TextMesh Pro sets these values when you generate the font Asset. They are not editable.| 524 525 526---- 527_NEW FILE:_ FontAssetsSDF.md 528 529 530<a name="FontAssetsSDF.md"></a> 531### About SDF fonts 532 533TextMesh Pro takes advantage of Signed Distance Field (SDF) rendering to generate font assets that look crisp when transformed, magnified, and so on, and support effects like outlines and drop shadows. 534 535Unlike black and white bitmap font textures, SDF font assets contain contour distance information. In font atlases, this information looks like grayscale gradients running from the middle of each glyph to a point past its edge, with the mid-point of the gradient corresponding to the edge of the glyph. 536 537The images below show bitmap and SDF font assets and the rendered text they produce. Notice that the bitmap fonts produce text whose edges are more or less jagged/blurry, depending on how far the text is from the camera, and how it is transformed/distorted. The SDF font, on the other hand produces text with completely smooth edges. 538 539![Example image](../images/TMP_FontAsssetBMPRaster.png) 540_A bitmap font, atlas texture and rendered result_ 541 542![Example image](../images/TMP_FontAsssetBMPSmooth.png) 543_A smoothed bitmap, atlas texture and rendered result_ 544 545![Example image](../images/TMP_FontAsssetSDF.png) 546_An SDF font, atlas texture and rendered result_ 547 548 549---- 550_NEW FILE:_ FontAssetsDynamicFonts.md 551 552 553<a name="FontAssetsDynamicFonts.md"></a> 554 555## Dynamic fonts assets 556Normally when you generate a font Asset using the Font Asset Creator, you choose which characters to include, and bake them into a Font Atlas texture. 557 558Dynamic font assets work the other way around. Instead of baking characters into an atlas in advance, you start with an empty atlas to which characters are added automatically as you use them. 559 560This makes dynamic fonts assets more flexible, but that flexibility comes at a cost. 561 562* Dynamic fonts require more computational resources than static fonts. 563 564* Dynamic font assets maintain a link to the original font file used to created them. That means: 565 566 * During development, you must keep the font file in the project. You cannot delete it as you can the source fonts of static font assets. 567 568 * Source fonts of any dynamic font assets in your game are included in builds, which can increase build size. 569 570 571This has several uses, for example: 572 573* Use dynamic fonts during development to capture characters you forgot to include in your baked font assets. 574 575* At runtime, use 576 577### Working with dynamic font assets 578 579#### Creating a dynamic font Asset 580 581Empty font assets are dynamic by default. To create one: 582 583* From Unity's main menu, choose **Assets > Create > TextMeshPro > Font Asset** or press **Ctrl/Cmd + Shift + F12**. 584 585To make an existing font Asset dynamic: 586 5871. Select Asset and open it in the Inspector. 588 5891. Set the **Generation Settings > Atlas Population Mode** property to **Dynamic**. 590 591#### Modifying dynamic font Asset settings 592 593#### Resetting a dynamic font Asset 594 595You reset TextMesh Pro dynamic font assets, the same way you reset other components: by choosing **Reset** from the gear icon menu or context menu in the Inspector. 596 597[IMAGE] 598 599However, instead of resetting all of the Asset's properties to their default values, the command affects only: 600 601* The Font Atlas 602* The Character Table 603* The Glyph Table 604* The Glyph Adjustment Table (kerning) 605 606These are reset to include only the characters/glyphs used by TextMesh Pro text objects that use the font Asset. 607 608If the Asset is currently unused, TextMesh Pro resizes the atlas texture to 0 x 0 pixels. 609 610**NOTE:** Resetting a static font Asset leaves the atlas texture as-is, but empties the character-, glyph-, and glyph adjustment tables. 611 612 613#### Updating/Baking a dynamic font Asset 614 615 616 617 618---- 619_NEW FILE:_ FontAssetsFallback.md 620 621 622<a name="FontAssetsFallback.md"></a> 623## Fallback font assets 624 625A font atlas, and by extension a font Asset, can only contain a certain number of glyphs. The exact number depends on the font, the size of the atlas texture, and the settings you use when generating the atlas. The fallback font system allows you to specify other font assets to search when TextMesh Pro can't find a glyph in a text object's font Asset. 626 627This is useful in a variety of situations, including: 628* Working with languages that have very large alphabets (Chinese, Korean, and Japanese, for example). Use fallback fonts to distribute an alphabet across several assets. 629 630* Designing for mobile devices, where an imposed maximum texture size prevents you from fitting an entire set of glyphs in a single atlas of sufficient quality. 631 632* Including special characters from other alphabets in your text. 633 634### Local and general fallback font assets 635 636Every font Asset can have its own list of fallback font assets. You set these in the [font Asset properties](FontAssetsProperties.md). 637 638You can also set general fallback font assets that apply to every TextMesh Pro font Asset in your project. You set these in the [TextMesh Pro settings](Settings.md). 639 640### The fallback chain 641 642In addition to a text object's fallback fonts, TextMesh Pro searches several other assets for missing glyphs. Together, these assets form the fallback chain. 643 644The table below lists the assets in the fallback chain in the order in which they are searched. 645 646|Position:| Asset: | Defined in:|Notes:| 647|:-:|-|-|| 648|1 | TextMesh Pro object's primary **Font Asset** | [Text object properties](TMPObjects.md) || 649|2 | Primary font assets **Fallback Font Assets** | [Font Asset properties](FontAssetsProperties.md) |TexMesh Pro searches these assets in the order they're listed in the [font Asset properties](FontAssetsProperties.md). <br/><br/>The search is recursive, and includes each fallback Asset's fallback assets. | 650|3 | Text object's **Sprite Asset** | [Text object properties](TMPObjects.md) |When searching sprite assets, TextMesh Pro looks for sprites with an assigned unicode value that matches the missing character's unicode value.| 651|4 | General **Fallback Font Assets** | [TextMesh Pro settings](Settings.md) |TexMesh Pro searches these assets in the order they're listed in the [font Asset properties](FontAssetsProperties.md). <br/><br/>The search is recursive, and includes each fallback Asset's fallback assets. | 652|5 | **Default Sprite Asset** | [TextMesh Pro settings](Settings.md) |When searching sprite assets, TextMesh Pro looks for sprites with an assigned unicode value that matches the missing character's unicode value.| 653|6 | **Default Font Asset** | [TextMesh Pro settings](Settings.md) | | 654|7 | **Missing glyphs** character | [TextMesh Pro settings](Settings.md) | | 655 656The fallback chain search is designed to detect circular references so each Asset in the chain is only searched once. 657 658 659---- 660_NEW FILE:_ RichText.md 661 662 663<a name="RichText.md"></a> 664# Rich Text 665 666Rich text tags alter the appearance and layout of text by supplementing or overriding TextMesh Pro GameObject properties. For example, you can use rich text tags to change the color or alignment of some, or all of your text without modifying its properties or material. 667 668**To use rich text tags:** 669* Enter any [supported rich text tags](RichTextSupportedTags.md) in the TextMeshPro [**Text** input field](TMPObjectUIText.md#text), inline with the text you want to display. 670 671**To disable rich text for a TextMesh Pro object:** 672* Open the TextMesh Pro GameObject in the Inspector, and disable the **Text Mesh Pro > Extra Settings > Rich Text** property. 673 674## Rich Text Tags 675 676Rich text tags are similar to HTML or XML tags, but have less strict syntax. 677 678A simple tag consists of only the tag name, and looks like this: 679 680`<tag>` 681 682For example, the `<b>` tag makes text bold, while the `<u>` tag underlines it. 683 684### Tag attributes and values 685 686Some tags have additional values or attributes, and look like this: 687 688 `<tag="value">` or `<tag attribute="value">` 689 690For example `<color=”red”>` makes text red. `Red` is the `color` tag’s value. 691 692 Similarly `<sprite index=3>` inserts the fourth sprite from the default Sprite Asset. `index` is an attribute of the `sprite` tag, and its value is `3`. 693 694A tag, including its attributes, can be up to 128 characters long. 695 696The table below lists possible attribute/value types. 697 698|Attribute/value type:|Example| 699|-------------|-------------| 700|Decimals|`0.5`| 701|Percentages|`25%`| 702|Pixel values|`5px`| 703|Font units|`1.5em`| 704|Hex color values|`#FFFFFF` (RGB)<br/>`#FFFFFFFF` (RGBA)<br/>`#FF` (A)| 705|Names|Both `<link=”ID”>` and `<link=ID>` are valid.| 706 707## Tag scope and nested tags 708 709Tags have a scope that defines how much of the text they affect. Most of the time, a tag added to a given point in the text affects all of the text from that point forward. 710 711For example, adding the tag `<color="red">` at the beginning of the text affects the entire text block: 712 713`<color="red">This text is red` 714 715![Example image](../images/TMP_RichTextExample1.png)<br/> 716_Successive color tags_ 717 718Adding the same tag in the middle of the text block affects only the text between the tag and the end of the block : 719 720`This text turns<color="red"> red` 721 722![Example image](../images/TMP_RichTextExample2.png)<br/> 723_Successive color tags_ 724 725If you use the same tag more than once in a text block, the last tag supersedes all previous tags of the same type. 726 727`<color="red">This text goes from red<color="green"> to green` 728 729![Example image](../images/TMP_RichTextExample3.png)<br/> 730_Successive color tags_ 731 732You can also limit the scope of most tags using a closing tag. Closing tags contain only a forward slash and the tag name, like this: `</tag>` 733 734Tags can also be _nested_ so one tag’s scope is within another tag’s scope. For example: 735 736``` 737<color=red>This text is <color=green>mostly </color>red. 738``` 739 740![Example image](../images/TMP_RichTextExample4.png)<br/> 741_Successive color tags_ 742 743The first `<color>` tag’s scope is the entire text block. The the second `<color>` tag has a closing tag that limits its scope to one word. 744 745When you nest tags, you don't have to close their scopes in the same order that you started them. 746 747## Rich-text tags and right-to-left text 748 749TextMesh Pro's right-to-left editor does not distinguish between regular text and rich text tags. Rich text tags that you enter in the right-to-left editor do not work unless you type them right-to-left as well. 750 751The easiest way to apply rich text tags to right-to-left text is to type the text in the right-to-left editor, and then apply the tags in the regular editor. 752 753 754---- 755_NEW FILE:_ RichTextSupportedTags.md 756 757 758<a name="RichTextSupportedTags.md"></a> 759## Supported Rich Text Tags 760 761The following table is a quick reference of supported rich text tags. For details, see the main pages for specific tags. 762 763[!include[](include-rich-text-tags.md)] 764 765 766---- 767_NEW FILE:_ RichTextAlignment.md 768 769 770<a name="RichTextAlignment.md"></a> 771## Text Alignment 772 773Each text object has an overall alignment, but you can override this with `<align>` tags. All [horizontal alignment options](TMPObjectUIText.md#alignment) are available except for **Geometry Center**. 774 775Normally you put these tags at the start of a paragraph. Successive alignment scopes don't stack. If you put multiple alignment tags on the same line, the last one overrides the others. 776 777The closing `</align>` tag reverts back to the object's overall alignment. 778 779**Example:** 780 781``` 782<align="left"><b>Left-aligned</b> 783 784<align="center"><b>Center-aligned</b> 785 786<align="right"><b>Right-aligned</b> 787 788<align="justified"><b>Justified:</b> stretched to fill the display area (except for the last line) 789 790<align="flush"><b>Flush:</b> stretched to fill the display area (including the last line) 791``` 792 793![Example image](../images/TMP_RichTextAlignment.png)<br/> 794_Text Alignment_ 795 796 797---- 798_NEW FILE:_ RichTextLetterCase.md 799 800 801<a name="RichTextLetterCase.md"></a> 802## Lowercase, Uppercase, and Smallcaps 803 804The `<lowercase>`, `<uppercase>`, `<allcaps>` and `<smallcaps>` tags alter the capitalization of your text before rendering. The text in the **Text** field remains as you entered it. 805 806* The `<lowercase>` and `<uppercase>` tags work as you would expect, converting to all capitals or no capitals before rendering. 807 808* The `<allcaps>` tag is functionally identical to `<uppercase>`. 809 810* The `<smallcaps>` tag works like `<uppercase>`, but also reduces the size of all characters that you entered in lowercase. 811 812**Example:** 813 814``` 815<lowercase>Alice and Bob watched TV.</lowercase> 816<uppercase>Alice and Bob watched TV.</uppercase> 817<allcaps>Alice and Bob watched TV.</allcaps> 818<smallcaps>Alice and Bob watched TV.</smallcaps> 819``` 820![Example image](../images/TMP_RichTextLetterCase.png)<br/> 821_Modifying capitalization._ 822 823 824---- 825_NEW FILE:_ RichTextOpacity.md 826 827 828<a name="RichTextOpacity.md"></a> 829## Text Opacity (Alpha) 830 831Use the `<alpha>` tag to change text opacity. It works with hexadecimal values. 832 833**Example:** 834 835``` 836<alpha=#FF>FF <alpha=#CC>CC <alpha=#AA>AA <alpha=#88>88 <alpha=#66>66 <alpha=#44>44 <alpha=#22>22 <alpha=#00>00 837``` 838 839![Example image](../images/TMP_RichTextAlpha.png)<br/> 840_Successive `<alpha>` tags_ 841 842 843---- 844_NEW FILE:_ RichTextBoldItalic.md 845 846 847<a name="RichTextBoldItalic.md"></a> 848## Bold and Italic 849 850You can apply bold and italic styling to your text with the `<b>` and `<i>` tags respectively. The [font Asset](FontAssetsProperties.md) defines how bold and italicized text looks when rendered. 851 852The closing `</b>` and `</i>` tags revert to the text's normal appearance. 853 854**Example:** 855 856``` 857The <i>quick brown fox</i> jumps over the <b>lazy dog</b>. 858``` 859 860![Example image](../images/TMP_RichTextBoldItalic.png)<br/> 861_Bold and italic._ 862 863 864---- 865_NEW FILE:_ RichTextColor.md 866 867 868<a name="RichTextColor.md"></a> 869## Text Color 870 871There are two ways to change text color with color tags: 872 873* Use named colors, as in `<color="colorName">`<br/><br/> 874 The following color names are supported: `black`, `blue`, `green`, `orange`, `purple`, `red`, `white`, and `yellow`.<br/><br/> 875* Use hexadecimal values, as in `<color=#FFFFFF>` or `<color=#FFFFFFFF>` if you also want to define the alpha value. 876 877If you apply successive `<color>` tags in the same text, the last one takes precedence over the others until you either add another `<color>`tage or use a closing `</color>` tag to end the current color's scope. 878 879**Example:** 880 881``` 882<color="red">Red <color=#005500>Dark Green <#0000FF>Blue <color=#FF000088>Semitransparent Red 883``` 884 885![Example image](../images/TMP_RichTextColors.png)<br/> 886_Successive color tags_ 887 888``` 889<color="red">Red, <color="blue">Blue,</color> and red again. 890``` 891 892![Example image](../images/TMP_RichTextColorClosing.png)<br/> 893_Closing color tag_ 894 895 896---- 897_NEW FILE:_ RichTextCharacterSpacing.md 898 899 900<a name="RichTextCharacterSpacing.md"></a> 901## Character Spacing 902 903The `<cspace>` tag allows you to adjust character spacing, either absolute or relative to the original font Asset. You can use pixels or font units. 904 905Postive adjustments push the characters apart, negative adjustments pull them together. 906 907The closing `</cspace>` tag reverts back to the font's normal spacing. 908 909**Example:** 910 911``` 912<cspace=1em>Spacing</cspace> is just as important as <cspace=-0.5em>timing. 913``` 914 915![Example image](../images/TMP_RichTextSpacing.png)<br/> 916_Character spacing_ 917 918 919---- 920_NEW FILE:_ RichTextFont.md 921 922 923<a name="RichTextFont.md"></a> 924## Font 925 926You can switch to a different font using `<font="fontAssetName">`. 927 928The font you specify replaces the default font until you insert a closing `<font>` tag. Font tags can be nested. 929 930You can also use the `material` attribute to switch between different materials for a single font. Font and material assets must be placed in specified in the TextMesh Pro settings Asset. 931 932To revert to the default font: 933* Close all open font tags using `</font>` tag 934* Use another `<font>` tag and set the font Asset name to `default` 935 936**Example:** 937 938``` 939Would you like <font="Impact SDF">a different font?</font> or just <font="NotoSans" material="NotoSans Outline">a different material? 940``` 941 942![Example image](../images/TMP_RichTextFont.png)<br/> 943_Mixing fonts and materials_ 944 945 946---- 947_NEW FILE:_ RichTextFontWeight.md 948 949 950<a name="RichTextFontWeight.md"></a> 951## Font weight 952 953Use the `<font-weight>` tag to switch between the font weights available for the current [Font Asset](FontAssets.md). 954 955You specify the weight using its numeric value, for example `400` for **normal**, `700` for **bold**, and so on. 956 957You can only apply font weights defined in the [Font Asset properties](FontAssetsProperties.md#FontWeights). If you have not defined any font weights, you can still use values of **400** and **700** to apply the multipliers set in the **Normal Weight** and **Bold Weight** properties. 958 959The closing `</font-weight>` tag reverts to the original font specified for the TextMesh Pro object. 960 961**Example:** 962 963``` 964<font-weight="100">Thin</font-weight> 965<font-weight="200">Extra-Light</font-weight> 966<font-weight="300">Light</font-weight> 967<font-weight="400">Regular</font-weight> 968<font-weight="500">Medium</font-weight> 969<font-weight="600">Semi-Bold</font-weight> 970<font-weight="700">Bold</font-weight> 971<font-weight="800">Heavy</font-weight> 972<font-weight="900">Black</font-weight> 973``` 974 975![Example image](../images/TMP_RichTextFontWeight.png)<br/> 976_Font weights_ 977 978 979---- 980_NEW FILE:_ RichTextGradient.md 981 982 983<a name="RichTextGradient.md"></a> 984## Gradient 985 986The `<gradient>` tag applies a pre-defined gradient preset to text. 987 988For more information about creating gradient presets, see the documentation on [Gradient Presets](ColorGradientsPresets.md). 989 990The closing `</gradient>` tag reverts to the TextMesh pro object's original color. 991 992**Example:** 993 994``` 995Apply<b> 996<gradient="Yellow to Orange - Vertical">any 997<gradient="Light to Dark Green - Vertical">gradient 998<gradient="Blue to Purple - Vertical">preset</gradient> 999</b>to your text 1000``` 1001 1002![Example image](../images/TMP_RichTextGradient.png)<br/> 1003_Successive gradient tags ended with a closing `</gradient>`_ 1004 1005**Note:** When you apply a gradient using this tag, it's multiplied by the TextMesh Pro object's current vertex colors. 1006 1007``` 1008This <gradient="Light to Dark Green - Vertical">Light to Dark Green gradient</gradient> is tinted by the red vertex color 1009``` 1010![Example image](../images/TMP_RichTextGradientTinted.png)<br/> 1011_Applying a green gradient to red text_ 1012 1013To apply the pure gradient to a selection of text, you can use a `<color>` tag to "reset" the color to white before applying the gradient. 1014 1015``` 1016This <color=#FFFFFFFF><gradient="Light to Dark Green - Vertical">Light to Dark Green gradient</gradient></color> is no longer tinted by the red vertex color 1017``` 1018![Example image](../images/TMP_RichTextGradientTintCorrected.png)<br/> 1019_"Resetting" the text's vertex color before applying a gradient_ 1020 1021 1022---- 1023_NEW FILE:_ RichTextBoldItalic.md 1024 1025 1026<a name="RichTextBoldItalic.md"></a> 1027## Bold and Italic 1028 1029You can apply bold and italic styling to your text with the `<b>` and `<i>` tags respectively. The [font Asset](FontAssetsProperties.md) defines how bold and italicized text looks when rendered. 1030 1031The closing `</b>` and `</i>` tags revert to the text's normal appearance. 1032 1033**Example:** 1034 1035``` 1036The <i>quick brown fox</i> jumps over the <b>lazy dog</b>. 1037``` 1038 1039![Example image](../images/TMP_RichTextBoldItalic.png)<br/> 1040_Bold and italic._ 1041 1042 1043---- 1044_NEW FILE:_ RichTextIndentation.md 1045 1046 1047<a name="RichTextIndentation.md"></a> 1048## Indentation 1049 1050The `<indent>` tag controls the horizontal caret position the same way the [`<pos>`](RichTextPos.md) tag does, but the effect persists across lines. 1051 1052Use this tag to create text patterns, such as bullet points, that work with word-wrapping. 1053 1054You specify indentation in pixels, font units, or percentages. 1055 1056**Example:** 1057 1058``` 10591. <indent=15%>It is useful for things like bullet points.</indent> 10602. <indent=15%>It is handy. 1061``` 1062 1063![Example image](../images/TMP_RichTextIndentation.png)<br/> 1064_Using indentation to make a list._ 1065 1066 1067---- 1068_NEW FILE:_ RichTextLineHeight.md 1069 1070 1071<a name="RichTextLineHeight.md"></a> 1072## Line Height 1073 1074Use the `<line-height>` tag to manually control line height. The line-height controls how far down from the current line the next line starts. It does not change the current line. 1075 1076Smaller values pull lines closer together. Larger values push them farther apart. 1077 1078You can specify the line height in pixels, font units, or percentages. 1079 1080Adjustments you make using this tag are relative to the line-height specified in the [Font Asset](FontAssetsProperties.md#FaceInfo). The `</line-height>` closing tag reverts to this height. 1081 1082**Example:** 1083 1084``` 1085Line height at 100% 1086<line-height=50%>Line height at 50% 1087<line-height=100%>Rather cozy. 1088<line-height=150%>Line height at 150% 1089Such distance! 1090``` 1091 1092![Example image](../images/TMP_RichTextLineHeight.png)<br/> 1093_Different line heights_ 1094 1095 1096---- 1097_NEW FILE:_ RichTextLineIndentation.md 1098 1099 1100<a name="RichTextLineIndentation.md"></a> 1101## Line Indentation 1102 1103The `<line-indent>` tag inserts horizontal space directly after it, and before the start of each new line. It only affects manual line breaks (including line breaks created with the [`<br>` tag](RichTextLineBreak.md), not word-wrapped lines. 1104 1105You can specify the indentation in pixels, font units, or percentages. 1106 1107The `</line-indent>` closing tag ends the indentation of lines. 1108 1109**Example:** 1110 1111``` 1112<line-indent=15%>This is the first line of this text example. 1113This is the second line of the same text. 1114``` 1115![Example image](../images/TMP_RichTextLineIndent.png)<br/> 1116_Indent every new line, with one tag_ 1117 1118 1119---- 1120_NEW FILE:_ RichTextLink.md 1121 1122 1123<a name="RichTextLink.md"></a> 1124## Text Link 1125 1126You can use `<link="ID">my link</link>` to add link metadata to a text segment. The link ID should be unique to allow you to retrieve its ID and link text content when the user interacts with your text. 1127 1128You do not have to give each link a unique ID. You can reuse IDs when it makes sense, for example when linking to the same data multiple times. The `linkInfo` array contains each ID only once. 1129 1130While this link enables user interaction, it does not change the appearance of the linked text. You have to use other tags for that. 1131 1132 1133---- 1134_NEW FILE:_ RichTextLetterCase.md 1135 1136 1137<a name="RichTextLetterCase.md"></a> 1138## Lowercase, Uppercase, and Smallcaps 1139 1140The `<lowercase>`, `<uppercase>`, `<allcaps>` and `<smallcaps>` tags alter the capitalization of your text before rendering. The text in the **Text** field remains as you entered it. 1141 1142* The `<lowercase>` and `<uppercase>` tags work as you would expect, converting to all capitals or no capitals before rendering. 1143 1144* The `<allcaps>` tag is functionally identical to `<uppercase>`. 1145 1146* The `<smallcaps>` tag works like `<uppercase>`, but also reduces the size of all characters that you entered in lowercase. 1147 1148**Example:** 1149 1150``` 1151<lowercase>Alice and Bob watched TV.</lowercase> 1152<uppercase>Alice and Bob watched TV.</uppercase> 1153<allcaps>Alice and Bob watched TV.</allcaps> 1154<smallcaps>Alice and Bob watched TV.</smallcaps> 1155``` 1156![Example image](../images/TMP_RichTextLetterCase.png)<br/> 1157_Modifying capitalization._ 1158 1159 1160---- 1161_NEW FILE:_ RichTextMargins.md 1162 1163 1164<a name="RichTextMargins.md"></a> 1165## Margin 1166 1167You can increase the horizontal margins of the text with the `<margin>` tag. 1168 1169If you only want to adjust the left or right margin, you can use the `<margin-left>` or `<margin-right>` tag. 1170 1171You can specify the margins in pixels, font units, and percentages. Negative values have no effect. 1172 1173Adjustments you make using this tag are relative to the margins specified in the [TexMesh Pro object](TMPObjectUIText.md#extra-settings). The `</margin>` closing tag reverts to this value. 1174 1175**Example:** 1176 1177``` 1178Our margins used to be very wide. 1179<margin=5em>But those days are long gone. 1180``` 1181 1182![Example image](../images/TMP_RichTextMargins.png)<br/> 1183_Adjusting margins_ 1184 1185 1186---- 1187_NEW FILE:_ RichTextMark.md 1188 1189 1190<a name="RichTextMark.md"></a> 1191## Mark 1192 1193The `<mark>` tag adds an overlay on top of the text. You can use it to highlight portions of your text. 1194 1195Because markings are overlaid on the text, you have to give them a semitransparent color for the text to show through. You can do this by specifying the color using a hex value that includes Alpha. 1196 1197You cannot combine marks. Each tag affects the text between itself and the next `<mark>` tag or a closing `</mark>` tag. 1198 1199**Example:** 1200 1201``` 1202Text <mark=#ffff00aa>can be marked with</mark> an overlay. 1203``` 1204 1205![Example image](../images/TMP_RichTextMark.png)<br/> 1206_Marked text_ 1207 1208 1209---- 1210_NEW FILE:_ RichTextMonospace.md 1211 1212 1213<a name="RichTextMonospace.md"></a> 1214## Monospacing 1215 1216You can override a font's character spacing and turn it into a monospace font with the `<mspace>` tag. This gives all characters the same amount of horizontal space. 1217 1218You can specify the character width in pixels or font units. 1219 1220The `</mspace>` closing tag clears all monospace overrides. 1221 1222**Example:** 1223 1224``` 1225Any font can become <mspace=2.75em>monospace, if you really want it. 1226``` 1227 1228![Example image](../images/TMP_RichTextMonospace.png)<br/> 1229_Treating a font as monospace_ 1230 1231 1232---- 1233_NEW FILE:_ RichTextNoBreak.md 1234 1235 1236<a name="RichTextNoBreak.md"></a> 1237## No Break 1238 1239Use the `<nobr>` tag to keep specific words together, and not be separated by word wrapping. 1240 1241The closing `</nobr>` tag reverts to the default behavior of allowing words to break where the line wraps. 1242 1243If you apply the `<nobr>` tag to a segment of text that is too big to fit on one line, the segment will break wherever the line wraps. 1244 1245**Example:** 1246 1247``` 1248You don't want <nobr>I M P O R T A N T</nobr> things to be broken up. 1249``` 1250 1251![Example image](../images/TMP_RichTextNoBreak.png)<br/> 1252_The important parts stay together_ 1253 1254 1255---- 1256_NEW FILE:_ RichTextNoParse.md 1257 1258 1259<a name="RichTextNoParse.md"></a> 1260## Noparse 1261 1262The `<noparse>` tag creates a scope that TextMesh Pro does not parse. 1263 1264This is useful for rendering text that TextMesh Pro normally interprets as a rich text tag, without disabling rich text tags. 1265 1266**Example:** 1267 1268``` 1269Use <noparse><b></noparse> for <b>bold</b> text. 1270``` 1271 1272![Example image](../images/TMP_RichTextNoParse.png)<br/> 1273_Prevent parsing of some tags_ 1274 1275 1276---- 1277_NEW FILE:_ RichTextPageBreak.md 1278 1279 1280<a name="RichTextPageBreak.md"></a> 1281## Page Break 1282 1283You can use the `<page>` tag to insert page breaks in your text. This cuts the text into separate blocks. 1284 1285For page breaks to work, you must set the TextMesh Pro object's [**Overflow** mode](TMPObjectUIText.md#wrapping) to **Page**. 1286 1287 1288---- 1289_NEW FILE:_ RichTextPos.md 1290 1291 1292<a name="RichTextPos.md"></a> 1293## Horizontal Position 1294 1295The `<pos>` tag gives you direct control over the horizontal caret position. This works best with horizontal alignment. 1296 1297The `<pos>` tag's position in the line has no effect on the caret position. 1298 1299This tag is best used with left alignment. 1300 1301You can specify the horizontal position in pixels, font units, or percentages. 1302 1303**Example:** 1304 1305``` 1306at <pos=75%>75% 1307at <pos=25%>25% 1308at <pos=50%>50% 1309at 0% 1310``` 1311 1312![Example image](../images/TMP_RichTextPos.png)<br/> 1313_Setting caret positions_ 1314 1315 1316---- 1317_NEW FILE:_ RichTextRotate.md 1318 1319 1320<a name="RichTextRotate.md"></a> 1321## Rotate 1322 1323Use the `<rotate>` tag to rotate each character about its center. Specify the amount of rotation in degrees. Positive values rotate characters counter-clockwise. Negative values rotate them clockwise. 1324 1325Rotation affects the spacing between characters, and may cause characters to overlap in some cases. Use the [`<cspace>`](RichTextCharacterSpacing) tag to correct character spacing as needed. 1326 1327**Example:** 1328 1329``` 1330Rotate text <rotate="-10">counter-clockwise</rotate> or <rotate="10">clockwise</rotate> 1331``` 1332 1333![Example image](../images/TMP_RichTextRotate.png)<br/> 1334_Text rotated counter-clockwise (left) and clockwise (right)_ 1335 1336``` 1337Rotate text <rotate="45">counter-clockwise</rotate> 1338``` 1339 1340![Example image](../images/TMP_RichTextRotateOverlap.png)<br/> 1341_More rotation makes it more likely that characters overlap_ 1342 1343``` 1344Rotate text <cspace="15"><rotate="45">counter-clockwise</rotate></cspace> 1345``` 1346 1347![Example image](../images/TMP_RichTextRotateOverlapCorrected.png)<br/> 1348_The `<cspace>` tag adjusts character spacing, and can help correct overlap caused by rotation_ 1349 1350 1351---- 1352_NEW FILE:_ RichTextStrikethroughUnderline.md 1353 1354 1355<a name="RichTextStrikethroughUnderline.md"></a> 1356## Strikethrough and Underline 1357 1358You can add additional lines that run along your text. 1359 1360- The `<underline>` tag draws the line slightly below the baseline to underline the text. The vertical offset is defined in the [Font Asset](FontAssetsProperties.md#FaceInfo). 1361 1362- The `<strikethrough>` tag places the line slightly above the baseline so it crosses out the text. 1363 1364**Example:** 1365 1366``` 1367The <s>quick brown</s> fox jumps over <u>the lazy dog</u>. 1368``` 1369 1370![Example image](../images/TMP_RichTextStrikethroughUnderline.png)<br/> 1371_Strikethrough and underline_ 1372 1373 1374---- 1375_NEW FILE:_ RichTextSize.md 1376 1377 1378<a name="RichTextSize.md"></a> 1379## Font Size 1380 1381Use the `<size>` tag to adjust the font size of your text. 1382 1383You can specify the new size in pixels, font units, or percentage. 1384 1385Pixel adjustments can be absolute (`5px`, `10px`, and so on) or relative (`+1` or `-1`, for example). Relative sizes are based on the original font size, so they're not cumulative. 1386 1387**Example:** 1388 1389``` 1390<size=100%>Echo <size=80%>Echo <size=60%>Echo <size=40%>Echo <size=20%>Echo 1391``` 1392 1393![Example image](../images/TMP_RichTextSize.png)<br/> 1394_Adjusting font size_ 1395 1396 1397---- 1398_NEW FILE:_ RichTextLetterCase.md 1399 1400 1401<a name="RichTextLetterCase.md"></a> 1402## Lowercase, Uppercase, and Smallcaps 1403 1404The `<lowercase>`, `<uppercase>`, `<allcaps>` and `<smallcaps>` tags alter the capitalization of your text before rendering. The text in the **Text** field remains as you entered it. 1405 1406* The `<lowercase>` and `<uppercase>` tags work as you would expect, converting to all capitals or no capitals before rendering. 1407 1408* The `<allcaps>` tag is functionally identical to `<uppercase>`. 1409 1410* The `<smallcaps>` tag works like `<uppercase>`, but also reduces the size of all characters that you entered in lowercase. 1411 1412**Example:** 1413 1414``` 1415<lowercase>Alice and Bob watched TV.</lowercase> 1416<uppercase>Alice and Bob watched TV.</uppercase> 1417<allcaps>Alice and Bob watched TV.</allcaps> 1418<smallcaps>Alice and Bob watched TV.</smallcaps> 1419``` 1420![Example image](../images/TMP_RichTextLetterCase.png)<br/> 1421_Modifying capitalization._ 1422 1423 1424---- 1425_NEW FILE:_ RichTextSpace.md 1426 1427 1428<a name="RichTextSpace.md"></a> 1429## Horizontal Space 1430 1431The `<space>` tag inserts a horizontal offset, as if you inserted multiple spaces. 1432 1433You can specify the offset in pixels or font units. 1434 1435When the `<space>` tag touches adjacent text, it appends or prepends the offset to that text, which affects how the text wraps. If you do not want the offset to wrap independently of adjacent text, make sure to add a space character on either side of the `<space>` tag. 1436 1437**Example:** 1438 1439``` 1440Give me some <space=5em> space. 1441``` 1442 1443![Example image](../images/TMP_RichTextSpace.png)<br/> 1444_Adding some space_ 1445 1446 1447---- 1448_NEW FILE:_ RichTextSprite.md 1449 1450 1451<a name="RichTextSprite.md"></a> 1452## Sprite 1453 1454The `<sprite>` tag inserts images from a [Sprite Asset](Sprites.md) into your text. Sprite assets must be located in the folder specified in the [TextMesh Pro settings](Settings.md). 1455 1456You can access sprites from the default sprite assets by index `<sprite index=1>` or by name `<sprite name="spriteName">`. When accessing a sprite from the default Asset by index, you can also use the index shorthand, `<sprite=1>`, 1457 1458To use sprites from a different Asset, specify the Asset before accessing the sprites by index `<sprite="assetName" index=1>` or by name `<sprite="assetName" name="spriteName">`. 1459 1460Adding the `tint=1` attribute to the tag tints the sprite with the [TextMesh Pro object's](TMPObjectUIText.md#Color) **Vertex Color**. You can choose a different color by adding a `color` attribute to the tag (`color=#FFFFFF`). 1461 1462**Example:** 1463 1464``` 1465Sprites! <sprite=0> More sprites! <sprite index=3> And even more! <sprite name="Default Sprite Asset_4" color=#55FF55FF> 1466``` 1467 1468![Example image](../images/TMP_RichTextSprite.png)<br/> 1469_Inserting sprites from the default sprite asset_ 1470 1471 1472---- 1473_NEW FILE:_ RichTextStyle.md 1474 1475 1476<a name="RichTextStyle.md"></a> 1477## Style 1478 1479Apply custom styles using the `<style>` tag. For more information about creating custom styles, see the documentation on [Style Sheets](StyleSheets.md). 1480 1481The opening `<style>` tag must contain the style name. The closing `</style>` tag, which simply closes the last style opened. 1482 1483**Example:** 1484 1485``` 1486<style="Title">Styles</style> 1487You can create your own. 1488``` 1489 1490![Example image](../images/TMP_RichTextStyle.png)<br/> 1491_Applying a custom style_ 1492 1493 1494---- 1495_NEW FILE:_ RichTextSubSuper.md 1496 1497 1498<a name="RichTextSubSuper.md"></a> 1499## Subscript and Superscript 1500 1501Use the `<sub>` and `<sup>` tags to render text as superscript or subscript. This is often used in scientific notation and ordinal numbering (1st, 2nd, etc.). 1502 1503Set the offset and size for sub- and superscript in the [Font Asset](FontAssetsProperties.md#FaceInfo). 1504 1505**Example:** 1506 1507``` 1508We have 1m<sup>3</sup> of H<sub>2</sub>O. 1509``` 1510 1511![Example image](../images/TMP_RichTextSubSuper.png)<br/> 1512_Subscript and superscript_ 1513 1514 1515---- 1516_NEW FILE:_ RichTextSubSuper.md 1517 1518 1519<a name="RichTextSubSuper.md"></a> 1520## Subscript and Superscript 1521 1522Use the `<sub>` and `<sup>` tags to render text as superscript or subscript. This is often used in scientific notation and ordinal numbering (1st, 2nd, etc.). 1523 1524Set the offset and size for sub- and superscript in the [Font Asset](FontAssetsProperties.md#FaceInfo). 1525 1526**Example:** 1527 1528``` 1529We have 1m<sup>3</sup> of H<sub>2</sub>O. 1530``` 1531 1532![Example image](../images/TMP_RichTextSubSuper.png)<br/> 1533_Subscript and superscript_ 1534 1535 1536---- 1537_NEW FILE:_ RichTextStrikethroughUnderline.md 1538 1539 1540<a name="RichTextStrikethroughUnderline.md"></a> 1541## Strikethrough and Underline 1542 1543You can add additional lines that run along your text. 1544 1545- The `<underline>` tag draws the line slightly below the baseline to underline the text. The vertical offset is defined in the [Font Asset](FontAssetsProperties.md#FaceInfo). 1546 1547- The `<strikethrough>` tag places the line slightly above the baseline so it crosses out the text. 1548 1549**Example:** 1550 1551``` 1552The <s>quick brown</s> fox jumps over <u>the lazy dog</u>. 1553``` 1554 1555![Example image](../images/TMP_RichTextStrikethroughUnderline.png)<br/> 1556_Strikethrough and underline_ 1557 1558 1559---- 1560_NEW FILE:_ RichTextLetterCase.md 1561 1562 1563<a name="RichTextLetterCase.md"></a> 1564## Lowercase, Uppercase, and Smallcaps 1565 1566The `<lowercase>`, `<uppercase>`, `<allcaps>` and `<smallcaps>` tags alter the capitalization of your text before rendering. The text in the **Text** field remains as you entered it. 1567 1568* The `<lowercase>` and `<uppercase>` tags work as you would expect, converting to all capitals or no capitals before rendering. 1569 1570* The `<allcaps>` tag is functionally identical to `<uppercase>`. 1571 1572* The `<smallcaps>` tag works like `<uppercase>`, but also reduces the size of all characters that you entered in lowercase. 1573 1574**Example:** 1575 1576``` 1577<lowercase>Alice and Bob watched TV.</lowercase> 1578<uppercase>Alice and Bob watched TV.</uppercase> 1579<allcaps>Alice and Bob watched TV.</allcaps> 1580<smallcaps>Alice and Bob watched TV.</smallcaps> 1581``` 1582![Example image](../images/TMP_RichTextLetterCase.png)<br/> 1583_Modifying capitalization._ 1584 1585 1586---- 1587_NEW FILE:_ RichTextVOffset.md 1588 1589 1590<a name="RichTextVOffset.md"></a> 1591## Vertical Offset 1592 1593Use the `<voffset>` tag to offset the text baseline vertically. This adjusts the line height accordingly to accommodate the text's offset position. You can compensate for that adjustment by manually adjusting the line height. 1594 1595Specify the offset in pixels or font units. The offset is always relative to the original baseline. 1596 1597The `</voffset>` closing tag resets the baseline back to its original position. 1598 1599**Example:** 1600 1601``` 1602Up <voffset=1em>up <voffset=2em>UP</voffset> and <voffset=-0.5em>down</voffset> we go again. 1603``` 1604 1605![Example image](../images/TMP_RichTextVOffset.png)<br/> 1606_Vertical offset_ 1607 1608 1609---- 1610_NEW FILE:_ RichTextWidth.md 1611 1612 1613<a name="RichTextWidth.md"></a> 1614## Text Width 1615 1616Use the `<width>` tag adjust the horizontal size of text area. The change takes effect on the current line, after the tag. Typically, you place the tag at the start of a paragraph. 1617 1618If you add more than one `,width>` tag to a line, the last one takes precedence over the others. 1619 1620You can specify the width in either pixels, font units, or percentages. The adjusted width cannot exceed the TextMesh Pro object's original width. 1621 1622The closing `</width>` tag reverts to the original width. 1623 1624**Example:** 1625 1626``` 1627I remember when we had lots of space for text. 1628<width=60%>But those days are long gone. 1629``` 1630![Example image](../images/TMP_RichTextWidth.png)<br/> 1631_Adjusting text area width_ 1632 1633 1634---- 1635_NEW FILE:_ StyleSheets.md 1636 1637 1638<a name="StyleSheets.md"></a> 1639# Style Sheets 1640 1641Use style sheets to create custom text styles that you can apply to text using the [`<style>` rich text tag](RichTextStyle.md). 1642 1643A custom style can include opening and closing rich text tags, as well as leading and trailing text. 1644 1645For example, you might want headings in your text to be big, red, bold, with an asterisk to either side and a line break at the end. 1646 1647![Example image](../images/TMP_StyleSheets_ExampleHeading_Render.png) 1648 1649Instead of typing this for every heading: 1650 1651`<font-weight=700><size=2em><color=#FF0000>*Heading*</color></size></font-weight><br>` 1652 1653You can create a style, called `H1` that includes all of that formatting: 1654 1655![Example image](../images/TMP_StyleSheets_ExampleHeading_Inspector.png) 1656 1657You can then format all of your headings with a single `<style>` tag: 1658 1659`<style="H1">Heading</style>` 1660 1661 1662## The default style sheet 1663 1664The default style sheet is the style sheet that every TextMesh Pro object in your 1665 1666TextMesh Pro ships with a default style sheet stored in the **TextMesh Pro > Resources > Style Sheets** folder, but you can set any style sheet to be the default. 1667 1668To change the default style sheet, set the **Default Style Sheet > Default Style Sheet** option in the [TextMesh Pro settings](Settings.md). 1669 1670## Per-object style sheets 1671 1672 1673 1674## Creating custom style sheets 1675 1676To create a new style sheet, choose **Assets > Create > TextMesh Pro > Style Sheet** from the menu. 1677 1678This adds a new TextMesh Pro style sheet to the Project. Open it in the Inspector to add custom styles. 1679 1680---- 1681_NEW FILE:_ Sprites.md 1682 1683 1684<a name="Sprites.md"></a> 1685# Sprites 1686 1687TextMesh Pro allows you to include sprites in your text via [rich text tags](RichTextSprite.md). 1688 1689To use sprites in your Scene, you need a Sprite Asset. You create sprite assets from atlas textures that each contain a given set of sprites. 1690 1691![Example image](../images/TMP_SpriteAtlas.png)<br/> 1692_A sprite atlas texture_ 1693 1694You can use as many sprite atlases and assets as you like, but keep in mind that using multiple atlases per text object results in multiple draw calls for that object, which consumes more system resources. As a rule, try to stick to one atlas per object. 1695 1696**Note:** Sprites are regular bitmap textures, so make sure that their resolution is high enough to display correctly on your target platforms. 1697 1698## Using Sprite Assets 1699 1700To use a sprite Asset in your project, put it in a `Resources/Sprites` folder. This allows TextMesh Pro to find it. 1701 1702Once you've added/created your sprite assets, you can set one as the default source for sprites in the project. You set the default sprite Asset in the [TextMesh Pro Settings](Settings.md#DefaultSprite). 1703 1704You can also choose sprite assets to use with specific text objects. Edit a [TexMesh Pro 3D]() or [TextmeshPro UI]() Asset to specify a sprite Asset to use with the font. 1705 1706## Creating a Sprite Asset 1707 1708You create sprite assets from atlas textures. Although sprite assets and their source textures are separate entities, you must keep the source textures in the project after creating the sprite assets. 1709 17101. Select the texture you want to use for the Sprite Asset. 1711 17121. In the Inspector, change the following Texture Importer properties. 1713 1714 * Set the **Texture Type** to **Sprite (2D and UI)**. 1715 1716 * Set the **Sprite Mode** to **Multiple**.<br/><br/>![Example image](../images/TMP_InspectorSpriteTexture.png) 1717 17181. Open the Sprite Editor from the Inspector, or choose **Window > 2D > Sprite Editor** from the menu, and use it to divide the texture into individual sprites. 1719 17201. With the texture still selected, choose **Asset > Create > TextMesh Pro > Sprite Asset** from the menu to create a new sprite Asset. 1721 1722After creating the sprite Asset, you can revert the atlas texture's **Texture Type** 1723to its original setting. 1724 1725## Sprite Asset Properties 1726 1727![Example image](../images/TMP_InspectorSpriteAsset.png) 1728 1729The Sprite Asset properties are divided into the following groups: 1730 1731![Example image](../images/Letter_A_half.png) **[Sprite Info](#SpriteInfo):** Provides references to the sprite Asset's material and source texture. 1732 1733![Example image](../images/Letter_B_half.png) **[Fallback Sprite Assets](#FallbackSpriteAssets):** Provides references to the sprite Asset's material and source texture. 1734 1735![Example image](../images/Letter_C_half.png) **[Sprite List](#SpriteList):** Provides references to the sprite Asset's material and source texture. 1736 1737<a name="FallbackFont"></a> 1738### Sprite Info 1739 1740![Example image](../images/TMP_InspectorSpriteAssetSpriteInfo.png) 1741 1742|Property:|Function:| 1743|-|-| 1744|**Sprite Atlas**|A reference to the sprite Asset's source texture.| 1745|**Default Material**|A reference to the sprite Asset's material, which it uses to render sprites.| 1746 1747<a name="FallbackFont"></a> 1748### Fallback Sprite Assets 1749 1750![Example image](../images/TMP_InspectorSpriteAssetFallback.png) 1751 1752When TextMesh Pro can't find a glyph in this sprite assets, it searches the fallback sprite assets that you specify here. 1753 1754|Property:|Function:| 1755|-|-| 1756|**Fallback Sprite Asset List**|Manage the fallback sprite assets.<br/><br/>Click **+** and **-** to add and remove font slots.<br/><br/>Click the circle icon next to a font to choose a font Asset using the Object Picker.<br/><br/>Drag the handles on the left side of any font Asset to reorder the list.| 1757 1758<a name="FallbackFont"></a> 1759### Sprite List 1760 1761![Example image](../images/TMP_InspectorSpriteAssetSpriteList.png) 1762 1763|Property:||Function:| 1764|-|-|-| 1765|**Sprite Search**||Search the sprite list by **ID** or **Name**.<br/><br/>Search results are ordered by **ID**, lowest to highest.| 1766|**Previous Page / Next Page**||Long sprite lists are split into pages, which you can navigate using these buttons (also located at the bottom of the section).| 1767|**Sprite Properties**||Manage the sprites in this Asset.<br/><br/>Click a sprite to make it active.<br/><br/>Click **Up** or **Down** to move the sprite up or down in the list.<br/><br/>Enter an **ID** in the text field and click **Goto** to move the sprite to that position in then list.<br/><br/>**Note:** Moving a sprite updates its **ID** and the **ID**s of all preceding sprites accordingly.<br/><br/>Click **+** to add a copy of the sprite to the list.<br/><br/>Click **-** to remove the sprite from the list.| 1768||ID|A unique ID for the sprite, based on its portion in the list.<br/><br/>You can use this value in [rich text tags](RichTextSprite.md) tags to add this sprite to text.<br/><br/>Reordering the list updates the **ID**s of any affected sprites| 1769||Unicode|| 1770||Name|A unique name for the sprite.<br/><br/>You can change this value, but it must be unique in the list<br/><br/>You can use this value in [rich text tags](RichTextSprite.md) to add this sprite to text.| 1771||X, Y, W, H|The rectangular area the character occupies in the sprite atlas.| 1772||OX, OY|Control the placement of the sprite, defined at its top-left corner relative to its origin on the baseline.| 1773||Adv.|Specify how far to advance along the baseline before placing the next sprite.| 1774||SF|Change this scaling factor value to adjust the size of the sprite.| 1775|**Global Offsets & Scale**||Use these settings to override the following values for all sprites in the Asset: **OX**, **OY**, **ADV.**, and **SF.**| 1776 1777 1778---- 1779_NEW FILE:_ ColorGradients.md 1780 1781 1782<a name="ColorGradients.md"></a> 1783# Color Gradients 1784 1785You can apply gradients of up to four colors to TextMesh Pro GameObjects. When you add a gradient, TextMesh Pro applies it to each character in the text individually. It stores gradient colors as in each character sprite's vertex colors. 1786 1787![Example image](../images/TMP_ColorGradient_4-Corner-no-legend.png) 1788 1789_TextMesh Pro text with a four-color gradient_ 1790 1791Because each character sprite consists of two triangles, gradients tend to have a dominant direction. This is most obvious in diagonal gradients. 1792 1793For example, the dominant direction in gradient below favors the red and black colors in the bottom-left and top-right corners 1794 1795![Example image](../images/TMP_ColorGradient_3-Corner-YBRY_half.png) 1796 1797When you reverse the gradient colors, so both the top-right and bottom-left corners are yellow, the dominant color changes. 1798 1799![Example image](../images/TMP_ColorGradient_3-Corner-RYYB_half.png) 1800 1801 1802TextMesh Pro multiplies gradient colors with the text's main vertex color (**Main Settings > Vertex Color** in the TextMesh Pro Inspector). If the main vertex color is white you see only the gradient colors. If it’s black you don’t see the gradient colors at all. 1803 1804## Applying a Gradient 1805 1806To apply a gradient to a TextMesh Pro GameObject, edit the [Gradient properties](TMPObjectUIText.md#color) in the Inspector. 1807 1808> [!NOTE] 1809> - To apply a gradient to only a portion of the text, use the [gradient](RichTextGradient.md) rich text tag. 1810> - To apply a gradient to multiple text objects, use a [gradient preset](ColorGradientsPresets.md). 1811 1812![Example image](../images/TMP_ColorGradientInspector.png) 1813 1814**To apply a color gradient to a TextMesh Pro GameObject:** 1815 18161. Enable the **Main Settings > Color Gradient** property. 1817 18181. Set **Main Settings > Color Gradient > Color Mode** to the [type of gradient](ColorGradientsTypes.md) you want to apply. 1819 18201. Use the **Main Settings > Color Gradient > Colors** settings to choose colors for the gradient. For each color you can: 1821 1822 - Click the color swatch to open a [Color Picker](https://docs.unity3d.com/Manual/EditingValueProperties.html). 1823 - Use the eyedropper to pick a color from anywhere on your screen. 1824 - Enter the color’s hexadecimal value directly in the text field. 1825 1826 1827---- 1828_NEW FILE:_ ColorGradientsTypes.md 1829 1830 1831<a name="ColorGradientsTypes.md"></a> 1832## Color Gradient Types 1833 1834You can apply the following types of gradients to text. 1835 1836- **[Single](#single-color):** A single color that is TextMesh Pro multiplies with the text object's vertex color. 1837 1838- **[Horizontal](#horizontal-gradients):** A two-color side-to-side gradient. 1839 1840- **[Vertical](#vertical-gradients):** A two-color up-and-down gradient. 1841 1842- **[Four Corner](#four-corner-gradients):** A four-color gradient. Each color radiates from one corner. 1843 1844![Example image](../images/TMP_ColorGradientInspector.png)<br/> 1845_The TexMesh Pro color gradient settings_ <br/><br/> 1846 1847The number of colors available in the **Colors** settings depends on the type of gradient you choose. Each swatch corresponds to the color's origin on a character sprite. 1848 1849The image above shows a the settings for a four color gradient. Each color originates in the corresponding corner of the sprite (top-left, top-right, bottom-left, bottom-right). IT produces the following gradient: 1850 1851![Example image](../images/TMP_ColorGradient_4-Corner-YBRG_half.png) 1852 1853 1854### Single Color 1855 1856The **Single** gradient type applies a single color. 1857 1858![Example image](../images/TMP_ColorGradient_Single-Y_half.png) 1859 1860### Horizontal Gradients 1861 1862The **Horizontal** gradient type applies two colors, and produces a side to side transition between them on each character. 1863 1864![Example image](../images/TMP_ColorGradient_Horiz-YB_half.png) 1865 1866![Example image](../images/TMP_ColorGradient_Horiz-BY_half.png)<br/><br/> 1867 1868### Vertical Gradients 1869 1870The **Vertical** gradient type consists of two colors, and produces an up and down transition between the two on each character. 1871 1872![Example image](../images/TMP_ColorGradient_Vert-BY_half.png)<br/><br/> 1873 1874![Example image](../images/TMP_ColorGradient_Vert-YB_half.png)<br/><br/> 1875 1876### Four Corner Gradients 1877 1878The **Four Corner** gradient type applies four colors. Each one radiates out from its assigned corner of each character. 1879 1880![Example image](../images/TMP_ColorGradient_4-Corner-YBRG_half.png)<br/><br/> 1881 1882![Example image](../images/TMP_ColorGradient_4-Corner-YBRO_half.png) 1883 1884This is the most versatile gradient type. By varying some colors and keeping others identical, you can create different kinds of gradients. For example: 1885 1886- Give three corners one color and the fourth a different color. 1887 1888![Example image](../images/TMP_ColorGradient_1-Corner-BYYY_half.png) 1889 1890- Give pairs of adjacent corners the same color to create horizontal or vertical gradients. 1891 1892![Example image](../images/TMP_ColorGradient_2-Corner-BYBY_half.png)<br/><br/> 1893 1894![Example image](../images/TMP_ColorGradient_2-Corner-BBYY_half.png) 1895 1896- Give pairs of diagonally opposite corners the same color to create diagonal gradients. 1897 1898![Example image](../images/TMP_ColorGradient_2-Corner-BYYB_half.png)<br/><br/> 1899 1900![Example image](../images/TMP_ColorGradient_2-Corner-YBBY_half.png)<br/><br/> 1901 1902- Create horizontal and vertical 3-color gradients with a dominant color at one end and a transition between two colors at the other. 1903 1904![Example image](../images/TMP_ColorGradient_3-Corner-YRYB_half.png)<br/><br/> 1905 1906![Example image](../images/TMP_ColorGradient_3-Corner-YYRB_half.png) 1907 1908- Give two diagonally opposite corners same color and give the other two corners different colors to create a diagonal stripe 3-color gradient. 1909 1910![Example image](../images/TMP_ColorGradient_3-Corner-RYYB_half.png)<br/><br/> 1911 1912![Example image](../images/TMP_ColorGradient_3-Corner-YBRY_half.png) 1913 1914 1915---- 1916_NEW FILE:_ ColorGradientsPresets.md 1917 1918 1919<a name="ColorGradientsPresets.md"></a> 1920## Gradient Presets 1921 1922Use gradient presets to reuse the same color gradients across text objects. A gradient preset overrides the text’s local gradient type and colors. 1923 1924You have to store Gradient presets in a specific folder so TextMesh Pro can find them and include them in builds. You can change the folder from the [TextMesh Pro settings](Settings.md#color-gradient-presets). 1925 1926### Creating gradient presets 1927 1928To create a gradient preset, choose **Assets > Create > TextMesh Pro > Color Gradient** from the menu. 1929 1930This adds a new TextMesh Pro Color Gradient Asset to the Scene, and opens it in the Inspector. 1931 1932![Example image](../images/TMP_ColorGradientPresetCreator.png) 1933 1934You can then select a [gradient type](ColorGradientTypes.md) from the **Color Mode** dropdown, and set the gradient **Colors**. 1935 1936### Applying gradient presets 1937 1938You apply a gradient preset to text from the TextMesh Pro Inspector. 1939 1940**To apply a gradient preset:** 1941 19421. Enable the **Main Settings > Color Gradient** property. 1943 19441. Open the Object Picker (circle icon) for **Main Settings > Color Preset**, and choose choose a preset 1945 1946When you apply a gradient preset, the Inspector overrides the text's gradient type and colors with the values from the preset. 1947 1948> [!CAUTION] 1949> If you modify the gradient settings in the TextMesh Pro Inspector after you apply a preset, it affects the preset itself. Changes affect every object that uses the same preset. 1950 1951### Removing gradient presets 1952 1953To remove a gradient preset, open the Object Picker (circle icon) for **Main Settings > Color Preset**, and choose **None**. 1954 1955When you remove the preset, the text reverts to its local gradient properties. 1956 1957 1958---- 1959_NEW FILE:_ Shaders.md 1960 1961 1962<a name="Shaders.md"></a> 1963# Shaders 1964 1965TextMesh Pro has been designed to take advantage of signed distance field (SDF) rendering and includes a collection of shaders for this purpose. There are also bitmap-only shaders, in case you don't want to use SDF rendering. 1966 1967All shaders have a desktop and a mobile version. The mobile versions are less demanding and suitable for mobile devices, but support fewer effects. All shaders can be found in the shader menu under TextMeshPro and TextMeshPro / Mobile. 1968 1969## SDF Shaders 1970 1971There are three variants of the SDF shader, known as Distance Field, Distance Field (Surface), and Distance Field Overlay. The regular and overlay shaders are unlit, so they don't interact with the Scene lighting. They can support locally simulated lighting effects instead. 1972 1973The surface shader versions do interact with the Scene lighting. They use Unity's surface shader framework and are quite flexible, but also more demanding on the GPU. They are not physically based shaders. 1974 1975SDF shaders can use the distance data to generate special effects, like outlines, underlays, and bevels. These effects often increase the visual size of the text. When taken to their extremes, you might see artifacts appear around the edges of character sprites. If this happens, scale down the effects. For example, a soft dilated underlay with large offsets might take things too far. 1976 1977The artifacts occur because data from adjacent characters in the font atlas will bleed into the current character. You can increase the padding when importing a font to give the effects more space. 1978 1979---- 1980_NEW FILE:_ ShadersDistanceField.md 1981 1982 1983<a name="ShadersDistanceField.md"></a> 1984### Distance Field / Distance Field Overlay Shaders 1985 1986The Distance Field and Distance Field Overlay shaders are two nearly-identical variants of the TextMesh Pro signed distance field (SDF)shader. The difference between the two is that the Distance Field Overlay variant always renders the TextMesh Pro object on top of everything else in the Scene, while the Distance Field variant renders the Scene normally—objects in front of the TextMesh Pro object are rendered on top of the text. 1987 1988![Example image](../images/IMAGE.png) 1989 1990Both of these variants are unlit, meaning they do not interact with Scene lighting. Instead, they can simulate local directional lighting effects. 1991 1992#### Properties 1993 1994The Distance Field and Distance Field Overlay shaders have identical properties, which you can edit in the TextMesh Pro object Inspector. 1995 1996Properties are divided into several sections, some of which you must enable in order to activate the property group. 1997 1998![Example image](../images/TMP_Shader_DF_Inspector.png) 1999 2000![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the text's overall appearance. 2001 2002![Example image](../images/Letter_B_half.png) **[Outline](#Outline):** Adds a colored and/or textured outline to the text. 2003 2004![Example image](../images/Letter_C_half.png) **[Underlay](#Underlay):** Adds a second rendering of the text underneath the original rendering, for example to add a drop shadow. 2005 2006![Example image](../images/Letter_D_half.png) **[Lighting](#Lighting):** Simulates local directional lighting on the text. 2007 2008![Example image](../images/Letter_E_half.png) **[Glow](#Glow):** Adds a smooth outline to the text in order to simulate glow. 2009 2010![Example image](../images/Letter_F_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 2011 2012<a name="Face"></a> 2013##### Face 2014 2015The Face properties control the overall appearance of the text. 2016 2017![Example image](../images/TMP_Shader_DF_Face.png) 2018 2019| Property: || Description | 2020|--------------|---|-------------| 2021| **Color** ||Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 2022| **Texture** ||Apply a texture to the text face.<br/><br/>The texture is multiplied with the face **Color** and the vertex colors in the TextMesh Pro component to produce the final face color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text face.| 2023| **Tiling X/Y** ||Increase these values to repeat the texture across the text surface, in accordance with the TextMesh Pro object's **Horizontal Mapping** and **Vertical Mapping** properties.| 2024| **Offset X/Y** ||Adjust these values to change the texture's relative position, horizontally or vertically, on the text surface. | 2025| **Speed X/Y** ||Animate the face texture by setting a value greater than **0**.<br/><br/>The resulting animation is a scrolling effect as the texture’s UV coordinates change over time.<br/><br/>**Note:** To see this effect in the Scene view, you must enable **Animated Materials** from the Effects menu in the [Scene view control bar](https://docs.unity3d.com/Manual/ViewModes.html).| 2026| **Softness** ||Adjust the softness of the text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>This setting applies to both the text face and the outline.| 2027| **Dilate** ||Adjust the position of the text contour in the font [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2028 2029<a name="Outline"></a> 2030##### Outline 2031 2032The outline properties allow you to add an outline to the text and control its appearance. The outline is not visible unless you set a **Thickness** value greater than **0**. 2033 2034![Example image](../images/TMP_Shader_DF_Outline.png) 2035 2036| Property: |Description | 2037|--------------|------------| 2038| **Color** |Adjust the color for the text outline.| 2039| **Texture** |Apply a texture to the text outline.<br/><br/>The texture is multiplied with the outline **Color** to produce the final outline color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text outline.| 2040| **Tiling** | | 2041| **Offset** | | 2042| **Speed** |Animate the outline texture by setting a value greater than 0.<br/><br/>The resulting animation is a scrolling effect as the texture’s UV coordinates change over time.<br/><br/>**Note:** To see this effect in the Scene view, you must enable **Animated Materials** from the Effects menu in the [Scene view control bar](https://docs.unity3d.com/Manual/ViewModes.html).| 2043| **Thickness** |Adjust the thickness of the outline. The higher the value, the thicker the line.<br/><br/>The outline is drawn on the text contour, with half its thickness inside the contour and half of it outside the contour.<br/><br/>You can pull it farther in or push it farther out by adjusting the **Face > Dilate** property.| 2044 2045<a name="Underlay"></a> 2046##### Underlay 2047 2048Underlay adds an additional rendering of the text underneath the original rendering. You can use it to add a drop-shadow effect. 2049 2050![Example image](../images/TMP_Shader_DF_Underlay.png) 2051 2052| Property: | | Description | 2053|--------------|---|-------------| 2054| **Underlay Type** | |Choose the type of underlay to render.| 2055| | None |No underlay. | 2056| | Normal |Renders the underlay underneath the original text.<br/><br/>This creates a standard drop-shadow style effect.| 2057| | Inner |Inverts the underlay and masks it with the original text so it is only visible inside the outline of the original letters.<br/><br/>This creates the type of drop shadow you would see through a cutout of the text.<br/><br/>To see an **Inner** underlay, you must make the text face transparent by setting its Alpha to **0**.| 2058| **Color** | |Set the color of the underlay text. The default is a semi-transparent black.| 2059| **Offset X/Offset Y** | |Offset the underlay text horizontally and vertically from the original text.<br/><br/>For example, if you’re using the underlay to create a drop shadow, you can position it to suggest a specific lighting direction.| 2060| **Dilate** | |Adjust the position of the underlay text contour in the font's [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2061| **Softness** | |Adjust the softness of the underlay text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>When using the underlay to create a drop-shadow, you can use this setting to make the shadows harder or softer.| 2062 2063<a name="Lighting"></a> 2064##### Lighting 2065 2066The Distance Field shader does not react to Scene lighting. Instead, it uses the settings in this group to simulate local directional lighting, and light effects. 2067 2068If you want your text to react to Scene lighting, use the [Distance Field Surface](ShaderDistanceFieldSurface.md) shader. 2069 2070![Example image](../images/TMP_Shader_DF_Lighting.png) 2071 2072The Lighting properties are grouped into the following sections 2073 2074![Example image](../images/Letter_A_half.png) **[Bevel](#Bevel):** 2075 2076![Example image](../images/Letter_B_half.png) **[Local Lighting](#LocalLighting):** 2077 2078![Example image](../images/Letter_C_half.png) **[Bump Map](#BumpMap):** 2079 2080![Example image](../images/Letter_D_half.png) **[Environment Map](#EnvironmentMap):** 2081 2082 2083<a name="Bevel"></a> 2084###### Bevel 2085 2086A bevel adds the illusion of depth to your text. It works like a normal map, except that the shader calculates the bevel using the font’s signed distance field. 2087 2088Bevels are prone to showing artifacts, especially when they are too pronounced. These artifacts are more obvious on some materials than on others. Sometimes, artifacts that are more obvious on a simple material are hardly noticeable on a more complex material. 2089 2090Although bevels work best with text that has an outline, you can apply them to text with no outline. In that case, you must set a positive **Width**, and should set a negative **Offset** to ensure that the whole bevel is visible. 2091 2092![Example image](../images/TMP_Shader_DF_LightingBevel.png) 2093 2094| Property: | | Description | 2095|--------------|-------------|-------------| 2096| **Type** | | Choose the type of bevel to apply | 2097| | Outer Bevel | Produces raised lettering with sloped sides.<br/><br/>The bevel starts at the outside of the outline and increases in height until it reaches the inside of the outline. | 2098| | Inner Bevel | Produces text with a raised outline.<br/><br/>The bevel starts at the outside of the outline, increases in height until it reaches the middle of the outline, and decreases in height until it reaches the inside of the outline. | 2099| **Amount** | | Adjust the steepness of the bevel.<br/><br/>This setting defines the apparent difference in height between low and high regions of the bevel. | 2100| **Offset** | | Offset the bevel from its usual position so it no longer matches the outline.<br/><br/>Different offsets produce very different bevels.<br/><br/>This is especially useful when you apply a bevel to text with no outline. | 2101| **Width** | | Adjust the bevel size.<br/><br/>Set a value of **0** to make the bevel fill the full thickness of the outline.<br/><br/>Set a positive value to make the bevel extend beyond both sides of the outline.<br/><br/>Set a negative value to shrink the bevel toward the middle of the outline.| 2102| **Roundness** | | Increase this value to smooth out more angular regions of the bevel. The effect is often quite subtle. | 2103| **Clamp** | | Set this value to limit the maximum height of the bevel.<br/><br/>Higher values mean the bevel reaches its maximum height sooner.<br/><br/>Clamped outer bevels end before reaching the inside edge of the outline.<br/><br/>Clamped inner bevels have a larger flat region in the middle of the outline. | 2104 2105<a name="LocalLighting"></a> 2106###### Local Lighting 2107 2108These settings control simulated local directional lighting. They work in combination with the Bevel, Bump Map, and Environment Map settings. 2109 2110 2111![Example image](../images/TMP_Shader_DF_LightingLocal.png) 2112 2113| Property: |Description | 2114|--------------|------------| 2115| **Light Angle** | Adjust the angle, in radians, of the simulated local light illuminating the text.<br/><br/>The default angle is approximately π (pi) radians, which positions the light above the text.| 2116| **Specular Color** | Set the tint for specular highlights.<br/><br/>These are the highlights you see when the text directly reflects the simulated local light source. | 2117| **Specular Power** | Adjust the appearance of specular highlights. Larger values produce larger and brighter highlights. | 2118| **Reflectivity Power** | Adjust the how much the **[Environment Map](#EnvironmentMap)** contributes to the final color of the text.<br/><br/>The higher the value, the more the text appears to reflect the environment map texture and color. | 2119| **Diffuse Shadow** | Adjust the overall shadow level.<br/><br/>Higher values produce stronger shadowing, and consequently fewer apparent light effects on the text. | 2120| **Ambient Shadow** | Adjust the ambient light level.<br/><br/>Settings lower than **1** darken the text color based on the slope of the text. This is a subtle effect that is only noticeable with strong bevels or normal maps. | 2121 2122<a name="BumpMap"></a> 2123###### Bump Map 2124 2125You can use a normal map as a bump map to add bumpiness to the text. The bump map affects both the text face and outline, but you can control how strongly it affects each one individually. If your text has both a bevel and a bump map, the two mix together. 2126 2127![Example image](../images/TMP_Shader_DF_LightingBump.png) 2128 2129| Property: |Description | 2130|--------------|------------| 2131| **Texture** | Select a normal map texture to use as a bump map. | 2132| **Face** | Control how much the bump map affects the text face.<br/><br/>A value of **0** shows no effect while a value of **1** shows the full effect of the bump map. | 2133| **Outline** | Control how much the bump map affects the text outline.<br/><br/>A value of **0** shows nothing while a value of **1** shows the full effect of the bump map. | 2134 2135<a name="EnvironmentMap"></a> 2136###### Environment Map 2137 2138You can use an environment map to add a reflection effect to your text face or outline, or for special image effects. The environment texture must be a cubemap. You can provide a static cubemap or create one at run time via a script. 2139 2140![Example image](../images/TMP_Shader_DF_LightingEnv.png) 2141 2142| Property: |Description | 2143|--------------|------------| 2144| **Face Color** | Choose a color to use to tint reflections on the text face.<br/><br/>This color is multiplied with the environment map before the reflectivity effect is applied to the text face.<br/><br/>When this color is set to black, the environment map has no effect on the text face.<br/><br/>When this color is set to white, the environment map is at full strength on the text face. | 2145| **Outline Color** | Choose a color to use to tint reflections on the text outline.<br/><br/>This color is multiplied with the environment map before the reflectivity effect is applied to the text outline.<br/><br/>When this color is set to black, the environment map has no effect on the text outline.<br/><br/>When this color is set to white, the environment map is at full strength on the text outline. | 2146| **Texture** | Choose a cubemap texture to use as an environment map. | 2147| **Rotation** | Rotate the environment map to control which parts of the texture are visible in the reflection. You can animate the rotation to create a sense of movement. | 2148 2149<a name="Glow"></a> 2150##### Glow 2151 2152The **Glow** effect adds a smooth outline on top of other text effects, which is typically used to suggest a glow. The effect is additive, so it is more noticeable on dark backgrounds. 2153 2154When the glow extends beyond the text boundary, the surface shader shades it as if it were part of the solid text, meaning that it gets simulated lighting effects such as specular highlights. 2155 2156![Example image](../images/TMP_Shader_DF_Glow.png) 2157 2158| Property: |Description | 2159|--------------|------------| 2160| **Color** |Set the tint and strength of the glow effect by adjusting the **Color** and **Alpha** values respectively. | 2161| **Offset** | Adjust the center of the glow effect.<br/><br/>A value of **0** places the center of the glow effect right on the text contour.<br/><br/>Positive values move the center out from the contour. Negative values move it in toward the center of the text. | 2162| **Inner** | Control how far the glow effect extends inward from the its start point (text contour + **Offset**). | 2163| **Outer** | Control how far the glow effect extends outward from the text contour (text contour + Offset). | 2164| **Power** | Control how the glow effect falls off from its center to its edges.<br/><br/>A value of **1** produces a strong, bright glow effect with a sharp linear falloff.<br/><br/>Lower values produce a glow effect with a quick drop in intensity followed by a more gradual falloff. | 2165 2166<a name="DebugSettings"></a> 2167##### Debug Settings 2168 2169The debug section exposes some of the shader’s internal properties. They can be helpful for troubleshooting problems you encounter with the shader. 2170 2171 2172![Example image](../images/TMP_Shader_DF_Debug.png) 2173 2174| Property: | | Description | 2175|----------------------------------|-----------|-------------| 2176| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 2177| **Gradient Scale** | |Represents the spread / range of the font’s [signed distance field](FontAssetsSDF.md).<br/><br/>This determines the effective range of material properties such as **Outline > Width** and **Underlay > Offset X/Y**.<br/><br/>This value is equal to Padding +1, with Padding being the **Padding** value set when the font Asset was created.<br/><br/>**Note:** This value is displayed for debugging purposes. You should not edit it manually. | 2178| **Texture Width/Texture Height** | | Displays the texture atlas width and height specified in the **Atlas Resolution** settings when the font Asset was created. | 2179| **Scale X/Scale X** | | Set multipliers for the SDF scale.<br/><br/>When set to **0**, characters are rendered as blocks.<br/><br/>Negative values soften the characters, while positive values make them appear sharper. | 2180| **Perspective Filter** | | When using a perspective camera, adjust this setting to make text look softer when viewed at sharp angles.<br/><br/>The default setting of **0.875** is adequate in most cases.<br/><br/>When using orthographic cameras, set this to **0**. | 2181| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 2182| **Mask** | | | 2183| | Mask Off | | 2184| | Mask Hard | | 2185| | Mask Soft | | 2186| **Mask Bounds** | | | 2187| **Softness X/Softness Y** | | When **Mask** is set to **Soft**, set these to adjust the softness of the edge of the text. | 2188| **Match Bounds Renderer** | | | 2189| **Clip Rect** | | Clip Rect defines the Left (**L**), Bottom (**B**), Right (**R**) and Top (**T**) world space coordinates of the masking rectangle.<br/><br/> This is normally set automatically by the **2D RectMask**. However when using a normal **TextMeshPro** component, this allows you to set / control the masking region. | 2190 2191 2192---- 2193_NEW FILE:_ ShadersDistanceField.md 2194 2195 2196<a name="ShadersDistanceField.md"></a> 2197### Distance Field / Distance Field Overlay Shaders 2198 2199The Distance Field and Distance Field Overlay shaders are two nearly-identical variants of the TextMesh Pro signed distance field (SDF)shader. The difference between the two is that the Distance Field Overlay variant always renders the TextMesh Pro object on top of everything else in the Scene, while the Distance Field variant renders the Scene normally—objects in front of the TextMesh Pro object are rendered on top of the text. 2200 2201![Example image](../images/IMAGE.png) 2202 2203Both of these variants are unlit, meaning they do not interact with Scene lighting. Instead, they can simulate local directional lighting effects. 2204 2205#### Properties 2206 2207The Distance Field and Distance Field Overlay shaders have identical properties, which you can edit in the TextMesh Pro object Inspector. 2208 2209Properties are divided into several sections, some of which you must enable in order to activate the property group. 2210 2211![Example image](../images/TMP_Shader_DF_Inspector.png) 2212 2213![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the text's overall appearance. 2214 2215![Example image](../images/Letter_B_half.png) **[Outline](#Outline):** Adds a colored and/or textured outline to the text. 2216 2217![Example image](../images/Letter_C_half.png) **[Underlay](#Underlay):** Adds a second rendering of the text underneath the original rendering, for example to add a drop shadow. 2218 2219![Example image](../images/Letter_D_half.png) **[Lighting](#Lighting):** Simulates local directional lighting on the text. 2220 2221![Example image](../images/Letter_E_half.png) **[Glow](#Glow):** Adds a smooth outline to the text in order to simulate glow. 2222 2223![Example image](../images/Letter_F_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 2224 2225<a name="Face"></a> 2226##### Face 2227 2228The Face properties control the overall appearance of the text. 2229 2230![Example image](../images/TMP_Shader_DF_Face.png) 2231 2232| Property: || Description | 2233|--------------|---|-------------| 2234| **Color** ||Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 2235| **Texture** ||Apply a texture to the text face.<br/><br/>The texture is multiplied with the face **Color** and the vertex colors in the TextMesh Pro component to produce the final face color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text face.| 2236| **Tiling X/Y** ||Increase these values to repeat the texture across the text surface, in accordance with the TextMesh Pro object's **Horizontal Mapping** and **Vertical Mapping** properties.| 2237| **Offset X/Y** ||Adjust these values to change the texture's relative position, horizontally or vertically, on the text surface. | 2238| **Speed X/Y** ||Animate the face texture by setting a value greater than **0**.<br/><br/>The resulting animation is a scrolling effect as the texture’s UV coordinates change over time.<br/><br/>**Note:** To see this effect in the Scene view, you must enable **Animated Materials** from the Effects menu in the [Scene view control bar](https://docs.unity3d.com/Manual/ViewModes.html).| 2239| **Softness** ||Adjust the softness of the text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>This setting applies to both the text face and the outline.| 2240| **Dilate** ||Adjust the position of the text contour in the font [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2241 2242<a name="Outline"></a> 2243##### Outline 2244 2245The outline properties allow you to add an outline to the text and control its appearance. The outline is not visible unless you set a **Thickness** value greater than **0**. 2246 2247![Example image](../images/TMP_Shader_DF_Outline.png) 2248 2249| Property: |Description | 2250|--------------|------------| 2251| **Color** |Adjust the color for the text outline.| 2252| **Texture** |Apply a texture to the text outline.<br/><br/>The texture is multiplied with the outline **Color** to produce the final outline color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text outline.| 2253| **Tiling** | | 2254| **Offset** | | 2255| **Speed** |Animate the outline texture by setting a value greater than 0.<br/><br/>The resulting animation is a scrolling effect as the texture’s UV coordinates change over time.<br/><br/>**Note:** To see this effect in the Scene view, you must enable **Animated Materials** from the Effects menu in the [Scene view control bar](https://docs.unity3d.com/Manual/ViewModes.html).| 2256| **Thickness** |Adjust the thickness of the outline. The higher the value, the thicker the line.<br/><br/>The outline is drawn on the text contour, with half its thickness inside the contour and half of it outside the contour.<br/><br/>You can pull it farther in or push it farther out by adjusting the **Face > Dilate** property.| 2257 2258<a name="Underlay"></a> 2259##### Underlay 2260 2261Underlay adds an additional rendering of the text underneath the original rendering. You can use it to add a drop-shadow effect. 2262 2263![Example image](../images/TMP_Shader_DF_Underlay.png) 2264 2265| Property: | | Description | 2266|--------------|---|-------------| 2267| **Underlay Type** | |Choose the type of underlay to render.| 2268| | None |No underlay. | 2269| | Normal |Renders the underlay underneath the original text.<br/><br/>This creates a standard drop-shadow style effect.| 2270| | Inner |Inverts the underlay and masks it with the original text so it is only visible inside the outline of the original letters.<br/><br/>This creates the type of drop shadow you would see through a cutout of the text.<br/><br/>To see an **Inner** underlay, you must make the text face transparent by setting its Alpha to **0**.| 2271| **Color** | |Set the color of the underlay text. The default is a semi-transparent black.| 2272| **Offset X/Offset Y** | |Offset the underlay text horizontally and vertically from the original text.<br/><br/>For example, if you’re using the underlay to create a drop shadow, you can position it to suggest a specific lighting direction.| 2273| **Dilate** | |Adjust the position of the underlay text contour in the font's [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2274| **Softness** | |Adjust the softness of the underlay text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>When using the underlay to create a drop-shadow, you can use this setting to make the shadows harder or softer.| 2275 2276<a name="Lighting"></a> 2277##### Lighting 2278 2279The Distance Field shader does not react to Scene lighting. Instead, it uses the settings in this group to simulate local directional lighting, and light effects. 2280 2281If you want your text to react to Scene lighting, use the [Distance Field Surface](ShaderDistanceFieldSurface.md) shader. 2282 2283![Example image](../images/TMP_Shader_DF_Lighting.png) 2284 2285The Lighting properties are grouped into the following sections 2286 2287![Example image](../images/Letter_A_half.png) **[Bevel](#Bevel):** 2288 2289![Example image](../images/Letter_B_half.png) **[Local Lighting](#LocalLighting):** 2290 2291![Example image](../images/Letter_C_half.png) **[Bump Map](#BumpMap):** 2292 2293![Example image](../images/Letter_D_half.png) **[Environment Map](#EnvironmentMap):** 2294 2295 2296<a name="Bevel"></a> 2297###### Bevel 2298 2299A bevel adds the illusion of depth to your text. It works like a normal map, except that the shader calculates the bevel using the font’s signed distance field. 2300 2301Bevels are prone to showing artifacts, especially when they are too pronounced. These artifacts are more obvious on some materials than on others. Sometimes, artifacts that are more obvious on a simple material are hardly noticeable on a more complex material. 2302 2303Although bevels work best with text that has an outline, you can apply them to text with no outline. In that case, you must set a positive **Width**, and should set a negative **Offset** to ensure that the whole bevel is visible. 2304 2305![Example image](../images/TMP_Shader_DF_LightingBevel.png) 2306 2307| Property: | | Description | 2308|--------------|-------------|-------------| 2309| **Type** | | Choose the type of bevel to apply | 2310| | Outer Bevel | Produces raised lettering with sloped sides.<br/><br/>The bevel starts at the outside of the outline and increases in height until it reaches the inside of the outline. | 2311| | Inner Bevel | Produces text with a raised outline.<br/><br/>The bevel starts at the outside of the outline, increases in height until it reaches the middle of the outline, and decreases in height until it reaches the inside of the outline. | 2312| **Amount** | | Adjust the steepness of the bevel.<br/><br/>This setting defines the apparent difference in height between low and high regions of the bevel. | 2313| **Offset** | | Offset the bevel from its usual position so it no longer matches the outline.<br/><br/>Different offsets produce very different bevels.<br/><br/>This is especially useful when you apply a bevel to text with no outline. | 2314| **Width** | | Adjust the bevel size.<br/><br/>Set a value of **0** to make the bevel fill the full thickness of the outline.<br/><br/>Set a positive value to make the bevel extend beyond both sides of the outline.<br/><br/>Set a negative value to shrink the bevel toward the middle of the outline.| 2315| **Roundness** | | Increase this value to smooth out more angular regions of the bevel. The effect is often quite subtle. | 2316| **Clamp** | | Set this value to limit the maximum height of the bevel.<br/><br/>Higher values mean the bevel reaches its maximum height sooner.<br/><br/>Clamped outer bevels end before reaching the inside edge of the outline.<br/><br/>Clamped inner bevels have a larger flat region in the middle of the outline. | 2317 2318<a name="LocalLighting"></a> 2319###### Local Lighting 2320 2321These settings control simulated local directional lighting. They work in combination with the Bevel, Bump Map, and Environment Map settings. 2322 2323 2324![Example image](../images/TMP_Shader_DF_LightingLocal.png) 2325 2326| Property: |Description | 2327|--------------|------------| 2328| **Light Angle** | Adjust the angle, in radians, of the simulated local light illuminating the text.<br/><br/>The default angle is approximately π (pi) radians, which positions the light above the text.| 2329| **Specular Color** | Set the tint for specular highlights.<br/><br/>These are the highlights you see when the text directly reflects the simulated local light source. | 2330| **Specular Power** | Adjust the appearance of specular highlights. Larger values produce larger and brighter highlights. | 2331| **Reflectivity Power** | Adjust the how much the **[Environment Map](#EnvironmentMap)** contributes to the final color of the text.<br/><br/>The higher the value, the more the text appears to reflect the environment map texture and color. | 2332| **Diffuse Shadow** | Adjust the overall shadow level.<br/><br/>Higher values produce stronger shadowing, and consequently fewer apparent light effects on the text. | 2333| **Ambient Shadow** | Adjust the ambient light level.<br/><br/>Settings lower than **1** darken the text color based on the slope of the text. This is a subtle effect that is only noticeable with strong bevels or normal maps. | 2334 2335<a name="BumpMap"></a> 2336###### Bump Map 2337 2338You can use a normal map as a bump map to add bumpiness to the text. The bump map affects both the text face and outline, but you can control how strongly it affects each one individually. If your text has both a bevel and a bump map, the two mix together. 2339 2340![Example image](../images/TMP_Shader_DF_LightingBump.png) 2341 2342| Property: |Description | 2343|--------------|------------| 2344| **Texture** | Select a normal map texture to use as a bump map. | 2345| **Face** | Control how much the bump map affects the text face.<br/><br/>A value of **0** shows no effect while a value of **1** shows the full effect of the bump map. | 2346| **Outline** | Control how much the bump map affects the text outline.<br/><br/>A value of **0** shows nothing while a value of **1** shows the full effect of the bump map. | 2347 2348<a name="EnvironmentMap"></a> 2349###### Environment Map 2350 2351You can use an environment map to add a reflection effect to your text face or outline, or for special image effects. The environment texture must be a cubemap. You can provide a static cubemap or create one at run time via a script. 2352 2353![Example image](../images/TMP_Shader_DF_LightingEnv.png) 2354 2355| Property: |Description | 2356|--------------|------------| 2357| **Face Color** | Choose a color to use to tint reflections on the text face.<br/><br/>This color is multiplied with the environment map before the reflectivity effect is applied to the text face.<br/><br/>When this color is set to black, the environment map has no effect on the text face.<br/><br/>When this color is set to white, the environment map is at full strength on the text face. | 2358| **Outline Color** | Choose a color to use to tint reflections on the text outline.<br/><br/>This color is multiplied with the environment map before the reflectivity effect is applied to the text outline.<br/><br/>When this color is set to black, the environment map has no effect on the text outline.<br/><br/>When this color is set to white, the environment map is at full strength on the text outline. | 2359| **Texture** | Choose a cubemap texture to use as an environment map. | 2360| **Rotation** | Rotate the environment map to control which parts of the texture are visible in the reflection. You can animate the rotation to create a sense of movement. | 2361 2362<a name="Glow"></a> 2363##### Glow 2364 2365The **Glow** effect adds a smooth outline on top of other text effects, which is typically used to suggest a glow. The effect is additive, so it is more noticeable on dark backgrounds. 2366 2367When the glow extends beyond the text boundary, the surface shader shades it as if it were part of the solid text, meaning that it gets simulated lighting effects such as specular highlights. 2368 2369![Example image](../images/TMP_Shader_DF_Glow.png) 2370 2371| Property: |Description | 2372|--------------|------------| 2373| **Color** |Set the tint and strength of the glow effect by adjusting the **Color** and **Alpha** values respectively. | 2374| **Offset** | Adjust the center of the glow effect.<br/><br/>A value of **0** places the center of the glow effect right on the text contour.<br/><br/>Positive values move the center out from the contour. Negative values move it in toward the center of the text. | 2375| **Inner** | Control how far the glow effect extends inward from the its start point (text contour + **Offset**). | 2376| **Outer** | Control how far the glow effect extends outward from the text contour (text contour + Offset). | 2377| **Power** | Control how the glow effect falls off from its center to its edges.<br/><br/>A value of **1** produces a strong, bright glow effect with a sharp linear falloff.<br/><br/>Lower values produce a glow effect with a quick drop in intensity followed by a more gradual falloff. | 2378 2379<a name="DebugSettings"></a> 2380##### Debug Settings 2381 2382The debug section exposes some of the shader’s internal properties. They can be helpful for troubleshooting problems you encounter with the shader. 2383 2384 2385![Example image](../images/TMP_Shader_DF_Debug.png) 2386 2387| Property: | | Description | 2388|----------------------------------|-----------|-------------| 2389| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 2390| **Gradient Scale** | |Represents the spread / range of the font’s [signed distance field](FontAssetsSDF.md).<br/><br/>This determines the effective range of material properties such as **Outline > Width** and **Underlay > Offset X/Y**.<br/><br/>This value is equal to Padding +1, with Padding being the **Padding** value set when the font Asset was created.<br/><br/>**Note:** This value is displayed for debugging purposes. You should not edit it manually. | 2391| **Texture Width/Texture Height** | | Displays the texture atlas width and height specified in the **Atlas Resolution** settings when the font Asset was created. | 2392| **Scale X/Scale X** | | Set multipliers for the SDF scale.<br/><br/>When set to **0**, characters are rendered as blocks.<br/><br/>Negative values soften the characters, while positive values make them appear sharper. | 2393| **Perspective Filter** | | When using a perspective camera, adjust this setting to make text look softer when viewed at sharp angles.<br/><br/>The default setting of **0.875** is adequate in most cases.<br/><br/>When using orthographic cameras, set this to **0**. | 2394| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 2395| **Mask** | | | 2396| | Mask Off | | 2397| | Mask Hard | | 2398| | Mask Soft | | 2399| **Mask Bounds** | | | 2400| **Softness X/Softness Y** | | When **Mask** is set to **Soft**, set these to adjust the softness of the edge of the text. | 2401| **Match Bounds Renderer** | | | 2402| **Clip Rect** | | Clip Rect defines the Left (**L**), Bottom (**B**), Right (**R**) and Top (**T**) world space coordinates of the masking rectangle.<br/><br/> This is normally set automatically by the **2D RectMask**. However when using a normal **TextMeshPro** component, this allows you to set / control the masking region. | 2403 2404 2405---- 2406_NEW FILE:_ ShadersDistanceFieldSurface.md 2407 2408 2409<a name="ShadersDistanceFieldSurface.md"></a> 2410### Distance Field (Surface) Shader 2411 2412The Distance Field (Surface) surface shader is similar to the Distance Field shader, but rather than simulating local directional lighting, it interacts with Scene lighting. It is not a physically based shader. 2413 2414This shader uses Unity's surface shader framework, which makes it quite flexible, but also more demanding on the GPU. 2415 2416#### Properties 2417![Example image](../images/TMP_Shader_DFS_Inspector.png) 2418 2419![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the appearance of the text face. 2420 2421![Example image](../images/Letter_B_half.png) **[Outline](#Outline):** Controls the appearance of the text outline. 2422 2423![Example image](../images/Letter_C_half.png) **[Bevel](#Bevel):** Adds a second rendering of the text underneath the original rendering, for example to add a drop shadow. 2424 2425![Example image](../images/Letter_D_half.png) **[SurfaceLighting](#SurfaceLighting):** Controls the appearance of locally simulated lighting on the text. 2426 2427![Example image](../images/Letter_E_half.png) **[Bump Map](#BumpMap):** Adds bumpiness to the text face and/or outline using a normal map texture. 2428 2429![Example image](../images/Letter_F_half.png) **[Environment Map](#EnvironmentMap):** Adds a reflection effect to the text face and/or outline using a normal map texture 2430 2431![Example image](../images/Letter_G_half.png) **[Glow](#Glow):** Adds a smooth outline to the text in order to simulate glow. 2432 2433![Example image](../images/Letter_H_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 2434 2435<a name="Face"></a> 2436##### Face 2437 2438You edit Distance Field Surface shader properties in the TextMesh Pro object Inspector. Properties are divided into several sections, some of which you must enable in order to activate the property group. 2439 2440![Example image](../images/TMP_Shader_DFS_Face.png) 2441 2442| Property: || Description | 2443|--------------|----|-------------| 2444| **Color** ||Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 2445| **Texture** ||Apply a texture to the text face.<br/><br/>The texture is multiplied with the face **Color** and the vertex colors in the TextMesh Pro component to produce the final face color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text face.| 2446| **Tiling** ||Increase these values to repeat the texture across the text surface, in accordance with the TextMesh Pro object's Horizontal Mapping and Vertical Mapping properties. | 2447| **Offset** ||Adjust these values to change the texture's relative position, horizontally or vertically, on the text surface.| 2448| **Speed** ||Animate the face texture by setting a value greater than **0**.<br/><br/>The resulting animation is a scrolling effect as the texture’s UV coordinates change over time.<br/><br/>**Note:** To see this effect in the Scene view, you must enable **Animated Materials** from the Effects menu in the [Scene view control bar](https://docs.unity3d.com/Manual/ViewModes.html).| 2449| **Softness** ||Adjust the softness of the text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>This setting applies to both the text face and the outline.| 2450| **Dilate** ||Adjust the position of the text contour in the font [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2451| **Gloss** ||Adjust the glossiness of the text face. <br/><br/> Glossiness determines the appearance of specular highlights when light hits the text. Higher values produce smaller specular highlights.| 2452 2453<a name="Outline"></a> 2454##### Outline 2455 2456Description 2457 2458![Example image](../images/TMP_Shader_DFS_Outline.png) 2459 2460| Property: |Description | 2461|--------------|------------| 2462| **Color** |Adjust the color for the text outline.<br/><br/>Tthe outline is not visible unless you set a **Thickness** value greater than **0**.| 2463| **Texture** |Apply a texture to the text outline.<br/><br/>The texture is multiplied with the outline **Color** to produce the final outline color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text outline.| 2464| **Tiling** | | 2465| **Offset** | | 2466| **Speed** |Animate the outline texture by setting a value greater than 0.<br/><br/>The resulting animation is a scrolling effect as the texture’s UV coordinates change over time.<br/><br/>**Note:** To see this effect in the Scene view, you must enable **Animated Materials** from the Effects menu in the [Scene view control bar](https://docs.unity3d.com/Manual/ViewModes.html).| 2467| **Thickness** |Adjust the thickness of the outline. The higher the value, the thicker the line.<br/><br/>The outline is drawn on the text contour, with half its thickness inside the contour and half of it outside the contour.<br/><br/>You can pull it farther in or push it farther out by adjusting the **Face > Dilate** property.| 2468| **Gloss** |Adjust the glossiness of the text outline. <br/><br/> Glossiness determines the appearance of specular highlights when light hits the text. Higher values produce smaller specualr highlights.| 2469 2470<a name="Bevel"></a> 2471##### Bevel 2472 2473A bevel adds the illusion of depth to your text. It works like a normal map, except that the shader calculates the bevel sing the font’s signed distance field. 2474 2475Bevels are prone to showing artifacts, especially when they are too pronounced. These artifacts are more or less obvious, depending on the material you use. Sometimes, artifacts that are more obvious on a simple material are hardly noticeable on a more complex material. 2476 2477Although bevels work best with text that has an outline, you can apply them to text without an outline as well. 2478 2479![Example image](../images/TMP_Shader_DFS_Bevel.png) 2480 2481| Property: | | Description | 2482|--------------|-------------|-------------| 2483| **Type** | | Choose the type of bevel to apply | 2484| | Outer Bevel | Produces raised lettering with sloped sides.<br/><br/>The bevel starts at the outside of the outline and increases in height until it reaches the inside of the outline. | 2485| | Inner Bevel | Produces text with a raised outline.<br/><br/>The bevel starts at the outside of the outline, increases in height until it reaches the middle of the outline, and decreases in height until it reaches the inside of the outline. | 2486| **Amount** | | Adjust the steepness of the bevel.<br/><br/>This setting defines the apparent difference in height between low and high regions of the bevel. | 2487| **Offset** | | Offset the bevel from its usual position so it no longer matches the outline.<br/><br/>Different offsets produce very different bevels.<br/><br/>This is especially useful when you apply a bevel to text with no outline. | 2488| **Width** | | Adjust the bevel size.<br/><br/>Set a value of **0** to make the bevel fill the full thickness of the outline.<br/><br/>Set a positive value to make the bevel extend beyond both sides of the outline.<br/><br/>Set a negative value to shrink the bevel toward the middle of the outline.<br/><br/>If you are setting a bevel for text with no outline, you must set a positive **Width**. You should also set a negative **Offset** to ensure that the whole bevel is visible. | 2489| **Roundness** | | Increase this value to smooth out more angular regions of the bevel. The effect is often quite subtle. | 2490| **Clamp** | | Set this value to limit the maximum height of the bevel.<br/><br/>Higher values mean the bevel reaches its maximum height sooner.<br/><br/>Clamped outer bevels end before reaching the inside edge of the outline.<br/><br/>Clamped inner bevels have a larger flat region in the middle of the outline. | 2491 2492<a name="SurfaceLighting"></a> 2493##### Surface Lighting 2494 2495These settings control simulated local directional lighting. They work in combination with the Bevel, Bump Map, and Environment Map settings. 2496 2497 2498![Example image](../images/TMP_Shader_DFS_SurfaceLighting.png) 2499 2500| Property: |Description | 2501|--------------|------------| 2502| **Specular Color** | Set the tint for specular highlights.<br/><br/>These are the highlights you see when the text directly reflects the simulated local light source. | 2503 2504<a name="BumpMap"></a> 2505##### Bump Map 2506 2507You can use a normal map as a bump map to add bumpiness to the text. The bump map affects both the text face and outline, but you can control how strongly it affects each one individually. If your text has both a bevel and a bump map, the two mix together. 2508 2509![Example image](../images/TMP_Shader_DFS_Bump.png) 2510 2511| Property: |Description | 2512|--------------|------------| 2513| **Texture** | Select a normal map texture to use as a bump map. | 2514| **Face** | Control how much the bump map affects the text face.<br/><br/>A value of **0** shows no effect while a value of **1** shows the full effect of the bump map. | 2515| **Outline** | Control how much the bump map affects the text outline.<br/><br/>A value of **0** shows nothing while a value of **1** shows the full effect of the bump map. | 2516 2517<a name="EnvironmentMap"></a> 2518##### Environment Map 2519 2520An environment map can be used to add a reflection effect to your text face or outline. You can either use it for reflections of a static Scene or for special image effects. The mobile shaders do not support this.The environment texture is a cubemap. You can either provide a static cubemap or create one at run time via a script. 2521 2522![Example image](../images/TMP_Shader_DFS_EnvMap.png) 2523 2524| Property: |Description | 2525|--------------|------------| 2526| **Face Color** | Choose a color to use to tint reflections on the text face.<br/><br/>This color is multiplied with the environment map before the reflectivity effect is applied to the text face.<br/><br/>When this color is set to black, the environment map has no effect on the text face.<br/><br/>When this color is set to white, the environment map is at full strength on the text face. | 2527| **Outline Color** | Choose a color to use to tint reflections on the text outline.<br/><br/>This color is multiplied with the environment map before the reflectivity effect is applied to the text outline.<br/><br/>When this color is set to black, the environment map has no effect on the text outline.<br/><br/>When this color is set to white, the environment map is at full strength on the text outline. | 2528| **Texture** | Choose a cubemap texture to use as an environment map. | 2529| **Rotation** | Rotate the environment map to control which parts of the texture are visible in the reflection. You can animate the rotation to create a sense of movement. | 2530 2531<a name="Glow"></a> 2532##### Glow 2533 2534The **Glow** effect adds a smooth outline on top of other text effects, which is typically used to suggest a glow. The effect is additive, so it is more noticeable on dark backgrounds. 2535 2536When the glow extends beyond the text boundary, the surface shader shades it as if it were part of the solid text, meaning that it gets simulated lighting effects such as specular highlights. 2537 2538![Example image](../images/TMP_Shader_DFS_Glow.png) 2539 2540| Property: |Description | 2541|--------------|------------| 2542| **Color** |Set the tint and strength of the glow effect by adjusting the **Color** and **Alpha** values respectively. | 2543| **Offset** | Adjust the center of the glow effect.<br/><br/>A value of **0** places the center of the glow effect right on the text contour.<br/><br/>Positive values move the center out from the contour. Negative values move it in toward the center of the text. | 2544| **Inner** | Control how far the glow effect extends inward from the its start point (text contour + **Offset**). | 2545| **Outer** | Control how far the glow effect extends outward from the text contour (text contour + Offset). | 2546| **Power** | Control how the glow effect falls off from its center to its edges.<br/><br/>A value of **1** produces a strong, bright glow effect with a sharp linear falloff.<br/><br/>Lower values produce a glow effect with a quick drop in intensity followed by a more gradual falloff. | 2547 2548<a name="DebugSettings"></a> 2549##### Debug Settings 2550 2551The debug section exposes some of the shader’s internal properties. They can be helpful for troubleshooting problems you encounter with the shader. 2552 2553 2554![Example image](../images/TMP_Shader_DFS_Debug.png) 2555 2556| Property: | | Description | 2557|----------------------------------|-----------|-------------| 2558| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 2559| **Gradient Scale** | |Represents the spread / range of the font’s [signed distance field](FontAssetsSDF.md).<br/><br/>This determines the effective range of material properties such as **Outline > Width** and **Underlay > Offset X/Y**.<br/><br/>This value is equal to Padding +1, with Padding being the **Padding** value set when the font Asset was created.<br/><br/>**Note:** This value is displayed for debugging purposes. You should not edit it manually. | 2560| **Texture Width/Texture Height** | | Displays the texture atlas width and height specified in the **Atlas Resolution** settings when the font Asset was created. | 2561| **Scale X/Scale X** | | Set multipliers for the SDF scale.<br/><br/>When set to **0**, characters are rendered as blocks.<br/><br/>Negative values soften the characters, while positive values make them appear sharper. | 2562| **Perspective Filter** | | When using a perspective camera, adjust this setting to make text look softer when viewed at sharp angles.<br/><br/>The default setting of **0.875** is adequate in most cases.<br/><br/>When using orthographic cameras, set this to **0**. | 2563| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 2564 2565 2566---- 2567_NEW FILE:_ ShadersDistanceFieldMobile.md 2568 2569 2570<a name="ShadersDistanceFieldMobile.md"></a> 2571### Distance Field / Distance Field Overlay Mobile Shaders 2572 2573The Distance Field and Distance Field Overlay shaders are two nearly-identical variants of the TextMesh Pro signed distance field (SDF)shader. The difference between the two is that the Distance Field Overlay variant always renders the TextMesh Pro object on top of everything else in the Scene, while the Distance Field variant renders the Scene normally—objects in front of the TextMesh Pro object are rendered on top of the text. 2574 2575![Example image](../images/IMAGE.png) 2576 2577Both of these variants are unlit, meaning they do not interact with Scene lighting. Instead, they can simulate local directional lighting effects. 2578 2579#### Properties 2580 2581The Distance Field and Distance Field Overlay shaders have identical properties, which you can edit in the TextMesh Pro object Inspector. 2582 2583Properties are divided into several sections, some of which you must enable in order to activate the property group. 2584 2585![Example image](../images/TMP_Shader_DF_Inspector.png) 2586 2587![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the text's overall appearance. 2588 2589![Example image](../images/Letter_B_half.png) **[Outline](#Outline):** Adds a colored and/or textured outline to the text. 2590 2591![Example image](../images/Letter_C_half.png) **[Underlay](#Underlay):** Adds a second rendering of the text underneath the original rendering, for example to add a drop shadow. 2592 2593![Example image](../images/Letter_D_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 2594 2595<a name="Face"></a> 2596##### Face 2597 2598The Face properties control the overall appearance of the text. 2599 2600![Example image](../images/TMP_Shader_DF_Face.png) 2601 2602| Property: | Description | 2603|--------------|-------------| 2604| **Color** |Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 2605| **Softness** |Adjust the softness of the text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>This setting applies to both the text face and the outline.| 2606| **Dilate** |Adjust the position of the text contour in the font [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2607 2608<a name="Outline"></a> 2609##### Outline 2610 2611The outline properties allow you to add an outline to the text and control its appearance. The outline is not visible unless you set a **Thickness** value greater than **0**. 2612 2613![Example image](../images/TMP_Shader_DF_Outline.png) 2614 2615| Property: |Description | 2616|--------------|------------| 2617| **Color** |Adjust the color for the text outline.| 2618| **Thickness** |Adjust the thickness of the outline. The higher the value, the thicker the line.<br/><br/>The outline is drawn on the text contour, with half its thickness inside the contour and half of it outside the contour.<br/><br/>You can pull it farther in or push it farther out by adjusting the **Face > Dilate** property.| 2619 2620<a name="Underlay"></a> 2621##### Underlay 2622 2623Underlay adds an additional rendering of the text underneath the original rendering. You can use it to add a drop-shadow effect. 2624 2625![Example image](../images/TMP_Shader_DF_Underlay.png) 2626 2627| Property: | | Description | 2628|--------------|---|-------------| 2629| **Underlay Type** | |Choose the type of underlay to render.| 2630| | None |No underlay. | 2631| | Normal |Renders the underlay underneath the original text.<br/><br/>This creates a standard drop-shadow style effect.| 2632| | Inner |Inverts the underlay and masks it with the original text so it is only visible inside the outline of the original letters.<br/><br/>This creates the type of drop shadow you would see through a cutout of the text.<br/><br/>To see an **Inner** underlay, you must make the text face transparent by setting its Alpha to **0**.| 2633| **Color** | |Set the color of the underlay text. The default is a semi-transparent black.| 2634| **Offset X/Offset Y** | |Offset the underlay text horizontally and vertically from the original text.<br/><br/>For example, if you’re using the underlay to create a drop shadow, you can position it to suggest a specific lighting direction.| 2635| **Dilate** | |Adjust the position of the underlay text contour in the font's [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2636| **Softness** | |Adjust the softness of the underlay text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>When using the underlay to create a drop-shadow, you can use this setting to make the shadows harder or softer.| 2637 2638<a name="DebugSettings"></a> 2639##### Debug Settings 2640 2641The debug section exposes some of the shader’s internal properties. They can be helpful for troubleshooting problems you encounter with the shader. 2642 2643 2644![Example image](../images/TMP_Shader_DF_Debug.png) 2645 2646| Property: | | Description | 2647|----------------------------------|-----------|-------------| 2648| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 2649| **Gradient Scale** | |Represents the spread / range of the font’s [signed distance field](FontAssetsSDF.md).<br/><br/>This determines the effective range of material properties such as **Outline > Width** and **Underlay > Offset X/Y**.<br/><br/>This value is equal to Padding +1, with Padding being the **Padding** value set when the font Asset was created.<br/><br/>**Note:** This value is displayed for debugging purposes. You should not edit it manually. | 2650| **Texture Width/Texture Height** | | Displays the texture atlas width and height specified in the **Atlas Resolution** settings when the font Asset was created. | 2651| **Scale X/Scale X** | | Set multipliers for the SDF scale.<br/><br/>When set to **0**, characters are rendered as blocks.<br/><br/>Negative values soften the characters, while positive values make them appear sharper. | 2652| **Perspective Filter** | | When using a perspective camera, adjust this setting to make text look softer when viewed at sharp angles.<br/><br/>The default setting of **0.875** is adequate in most cases.<br/><br/>When using orthographic cameras, set this to **0**. | 2653| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 2654| **Softness X/Softness Y** | | When **Mask** is set to **Soft**, set these to adjust the softness of the edge of the text. | 2655| **Clip Rect** | | Clip Rect defines the Left (**L**), Bottom (**B**), Right (**R**) and Top (**T**) world space coordinates of the masking rectangle.<br/><br/> This is normally set automatically by the **2D RectMask**. However when using a normal **TextMeshPro** component, this allows you to set / control the masking region. | 2656 2657 2658---- 2659_NEW FILE:_ ShadersDistanceFieldMaskingMobile.md 2660 2661 2662<a name="ShadersDistanceFieldMaskingMobile.md"></a> 2663### Distance Field Masking Mobile Shader 2664 2665The Distance Field and Distance Field Overlay shaders are two nearly-identical variants of the TextMesh Pro signed distance field (SDF)shader. The difference between the two is that the Distance Field Overlay variant always renders the TextMesh Pro object on top of everything else in the Scene, while the Distance Field variant renders the Scene normally—objects in front of the TextMesh Pro object are rendered on top of the text. 2666 2667![Example image](../images/IMAGE.png) 2668 2669Both of these variants are unlit, meaning they do not interact with Scene lighting. Instead, they can simulate local directional lighting effects. 2670 2671#### Properties 2672 2673The Distance Field and Distance Field Overlay shaders have identical properties, which you can edit in the TextMesh Pro object Inspector. 2674 2675Properties are divided into several sections, some of which you must enable in order to activate the property group. 2676 2677![Example image](../images/TMP_Shader_DFMM_Inspector.png) 2678 2679![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the text's overall appearance. 2680 2681![Example image](../images/Letter_B_half.png) **[Outline](#Outline):** Adds a colored and/or textured outline to the text. 2682 2683![Example image](../images/Letter_C_half.png) **[Underlay](#Underlay):** Adds a second rendering of the text underneath the original rendering, for example to add a drop shadow. 2684 2685![Example image](../images/Letter_D_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 2686 2687<a name="Face"></a> 2688##### Face 2689 2690The Face properties control the overall appearance of the text. 2691 2692![Example image](../images/TMP_Shader_DFMM_Face.png) 2693 2694| Property: | Description | 2695|--------------|-------------| 2696| **Color** |Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 2697| **Softness** |Adjust the softness of the text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>This setting applies to both the text face and the outline.| 2698| **Dilate** |Adjust the position of the text contour in the font [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2699 2700<a name="Outline"></a> 2701##### Outline 2702 2703The outline properties allow you to add an outline to the text and control its appearance. The outline is not visible unless you set a **Thickness** value greater than **0**. 2704 2705![Example image](../images/TMP_Shader_DFMM_Outline.png) 2706 2707| Property: |Description | 2708|--------------|------------| 2709| **Color** |Adjust the color for the text outline.| 2710| **Thickness** |Adjust the thickness of the outline. The higher the value, the thicker the line.<br/><br/>The outline is drawn on the text contour, with half its thickness inside the contour and half of it outside the contour.<br/><br/>You can pull it farther in or push it farther out by adjusting the **Face > Dilate** property.| 2711 2712<a name="Underlay"></a> 2713##### Underlay 2714 2715Underlay adds an additional rendering of the text underneath the original rendering. You can use it to add a drop-shadow effect. 2716 2717![Example image](../images/TMP_Shader_DF_Underlay.png) 2718 2719| Property: | | Description | 2720|--------------|---|-------------| 2721| **Underlay Type** | |Choose the type of underlay to render.| 2722| | None |No underlay. | 2723| | Normal |Renders the underlay underneath the original text.<br/><br/>This creates a standard drop-shadow style effect.| 2724| | Inner |Inverts the underlay and masks it with the original text so it is only visible inside the outline of the original letters.<br/><br/>This creates the type of drop shadow you would see through a cutout of the text.<br/><br/>To see an **Inner** underlay, you must make the text face transparent by setting its Alpha to **0**.| 2725| **Color** | |Set the color of the underlay text. The default is a semi-transparent black.| 2726| **Offset X/Offset Y** | |Offset the underlay text horizontally and vertically from the original text.<br/><br/>For example, if you’re using the underlay to create a drop shadow, you can position it to suggest a specific lighting direction.| 2727| **Dilate** | |Adjust the position of the underlay text contour in the font's [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2728| **Softness** | |Adjust the softness of the underlay text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>When using the underlay to create a drop-shadow, you can use this setting to make the shadows harder or softer.| 2729 2730<a name="DebugSettings"></a> 2731##### Debug Settings 2732 2733The debug section contains options for defining and controlling masking. It also exposes some of the shader’s internal properties, which can be helpful for troubleshooting. 2734 2735 2736 2737![Example image](../images/TMP_Shader_DFMM_Debug.png) 2738 2739| Property: | | Description | 2740|----------------------------------|-----------|-------------| 2741| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 2742| **Gradient Scale** | |Represents the spread / range of the font’s [signed distance field](FontAssetsSDF.md).<br/><br/>This determines the effective range of material properties such as **Outline > Width** and **Underlay > Offset X/Y**.<br/><br/>This value is equal to Padding +1, with Padding being the **Padding** value set when the font Asset was created.<br/><br/>**Note:** This value is displayed for debugging purposes. You should not edit it manually. | 2743| **Texture Width/Texture Height** | | Displays the texture atlas width and height specified in the **Atlas Resolution** settings when the font Asset was created. | 2744| **Scale X/Scale X** | | Set multipliers for the SDF scale.<br/><br/>When set to **0**, characters are rendered as blocks.<br/><br/>Negative values soften the characters, while positive values make them appear sharper. | 2745| **Perspective Filter** | | When using a perspective camera, adjust this setting to make text look softer when viewed at sharp angles.<br/><br/>The default setting of **0.875** is adequate in most cases.<br/><br/>When using orthographic cameras, set this to **0**. | 2746| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 2747| **Mask Texture** | | Choose a texture file to use as a mask. Black and white images work best. <br/><br/>By default, black regions of the image mask the text, while white areas reveal it. | 2748| **Inverse Mask** | | Invert the mask so that white regions of the image mask the text, while black areas reveal it. | 2749| **Edge Color** | | Tint the edge of the mask with a specific color. <br/><br/>The softer the edge, the larger the tinted region. | 2750| **Edge Softness** | | Make the edges of the mask softer or harder. <br/><br/>A value of **0.5** applies the mask as-is. Higher values soften the edges. Lower values make them sharper. | 2751| **Wipe Position** | | Control the extent to which the text is masked. <br/><br/> A value of **0.5** masks the text exactly as defined by the **Mask Texture**. <br/><br/>A value of **0** fully exposes the text (no masking at all). <br/><br/> A value of **1** hides the text (all of the text is masked). | 2752| **Softness X/Softness Y** | | Apply soft masking to the text in either axis. <br/><br/>Increase the **X** value to add soft masking to the left and right sides of the text. Increase the **Y** value to add soft masking at the top and bottom. <br/><br/>This masking is added to any masking defined by the **Mask Texture**.| 2753| **Clip Rect** | | Clip Rect defines the Left (**L**), Bottom (**B**), Right (**R**) and Top (**T**) world space coordinates of the masking rectangle.<br/><br/> This is normally set automatically by the **2D RectMask**. However when using a normal **TextMeshPro** component, this allows you to set / control the masking region. | 2754 2755 2756---- 2757_NEW FILE:_ ShadersDistanceFieldMobile.md 2758 2759 2760<a name="ShadersDistanceFieldMobile.md"></a> 2761### Distance Field / Distance Field Overlay Mobile Shaders 2762 2763The Distance Field and Distance Field Overlay shaders are two nearly-identical variants of the TextMesh Pro signed distance field (SDF)shader. The difference between the two is that the Distance Field Overlay variant always renders the TextMesh Pro object on top of everything else in the Scene, while the Distance Field variant renders the Scene normally—objects in front of the TextMesh Pro object are rendered on top of the text. 2764 2765![Example image](../images/IMAGE.png) 2766 2767Both of these variants are unlit, meaning they do not interact with Scene lighting. Instead, they can simulate local directional lighting effects. 2768 2769#### Properties 2770 2771The Distance Field and Distance Field Overlay shaders have identical properties, which you can edit in the TextMesh Pro object Inspector. 2772 2773Properties are divided into several sections, some of which you must enable in order to activate the property group. 2774 2775![Example image](../images/TMP_Shader_DF_Inspector.png) 2776 2777![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the text's overall appearance. 2778 2779![Example image](../images/Letter_B_half.png) **[Outline](#Outline):** Adds a colored and/or textured outline to the text. 2780 2781![Example image](../images/Letter_C_half.png) **[Underlay](#Underlay):** Adds a second rendering of the text underneath the original rendering, for example to add a drop shadow. 2782 2783![Example image](../images/Letter_D_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 2784 2785<a name="Face"></a> 2786##### Face 2787 2788The Face properties control the overall appearance of the text. 2789 2790![Example image](../images/TMP_Shader_DF_Face.png) 2791 2792| Property: | Description | 2793|--------------|-------------| 2794| **Color** |Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 2795| **Softness** |Adjust the softness of the text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>This setting applies to both the text face and the outline.| 2796| **Dilate** |Adjust the position of the text contour in the font [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2797 2798<a name="Outline"></a> 2799##### Outline 2800 2801The outline properties allow you to add an outline to the text and control its appearance. The outline is not visible unless you set a **Thickness** value greater than **0**. 2802 2803![Example image](../images/TMP_Shader_DF_Outline.png) 2804 2805| Property: |Description | 2806|--------------|------------| 2807| **Color** |Adjust the color for the text outline.| 2808| **Thickness** |Adjust the thickness of the outline. The higher the value, the thicker the line.<br/><br/>The outline is drawn on the text contour, with half its thickness inside the contour and half of it outside the contour.<br/><br/>You can pull it farther in or push it farther out by adjusting the **Face > Dilate** property.| 2809 2810<a name="Underlay"></a> 2811##### Underlay 2812 2813Underlay adds an additional rendering of the text underneath the original rendering. You can use it to add a drop-shadow effect. 2814 2815![Example image](../images/TMP_Shader_DF_Underlay.png) 2816 2817| Property: | | Description | 2818|--------------|---|-------------| 2819| **Underlay Type** | |Choose the type of underlay to render.| 2820| | None |No underlay. | 2821| | Normal |Renders the underlay underneath the original text.<br/><br/>This creates a standard drop-shadow style effect.| 2822| | Inner |Inverts the underlay and masks it with the original text so it is only visible inside the outline of the original letters.<br/><br/>This creates the type of drop shadow you would see through a cutout of the text.<br/><br/>To see an **Inner** underlay, you must make the text face transparent by setting its Alpha to **0**.| 2823| **Color** | |Set the color of the underlay text. The default is a semi-transparent black.| 2824| **Offset X/Offset Y** | |Offset the underlay text horizontally and vertically from the original text.<br/><br/>For example, if you’re using the underlay to create a drop shadow, you can position it to suggest a specific lighting direction.| 2825| **Dilate** | |Adjust the position of the underlay text contour in the font's [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2826| **Softness** | |Adjust the softness of the underlay text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>When using the underlay to create a drop-shadow, you can use this setting to make the shadows harder or softer.| 2827 2828<a name="DebugSettings"></a> 2829##### Debug Settings 2830 2831The debug section exposes some of the shader’s internal properties. They can be helpful for troubleshooting problems you encounter with the shader. 2832 2833 2834![Example image](../images/TMP_Shader_DF_Debug.png) 2835 2836| Property: | | Description | 2837|----------------------------------|-----------|-------------| 2838| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 2839| **Gradient Scale** | |Represents the spread / range of the font’s [signed distance field](FontAssetsSDF.md).<br/><br/>This determines the effective range of material properties such as **Outline > Width** and **Underlay > Offset X/Y**.<br/><br/>This value is equal to Padding +1, with Padding being the **Padding** value set when the font Asset was created.<br/><br/>**Note:** This value is displayed for debugging purposes. You should not edit it manually. | 2840| **Texture Width/Texture Height** | | Displays the texture atlas width and height specified in the **Atlas Resolution** settings when the font Asset was created. | 2841| **Scale X/Scale X** | | Set multipliers for the SDF scale.<br/><br/>When set to **0**, characters are rendered as blocks.<br/><br/>Negative values soften the characters, while positive values make them appear sharper. | 2842| **Perspective Filter** | | When using a perspective camera, adjust this setting to make text look softer when viewed at sharp angles.<br/><br/>The default setting of **0.875** is adequate in most cases.<br/><br/>When using orthographic cameras, set this to **0**. | 2843| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 2844| **Softness X/Softness Y** | | When **Mask** is set to **Soft**, set these to adjust the softness of the edge of the text. | 2845| **Clip Rect** | | Clip Rect defines the Left (**L**), Bottom (**B**), Right (**R**) and Top (**T**) world space coordinates of the masking rectangle.<br/><br/> This is normally set automatically by the **2D RectMask**. However when using a normal **TextMeshPro** component, this allows you to set / control the masking region. | 2846 2847 2848---- 2849_NEW FILE:_ ShadersDistanceFieldSurfaceMobile.md 2850 2851 2852<a name="ShadersDistanceFieldSurfaceMobile.md"></a> 2853### Distance Field (Surface) Mobile Shader 2854 2855The Distance Field (Surface) surface shader is similar to the Distance Field shader, but rather than simulating local directional lighting, it interacts with Scene lighting. It is not a physically based shader. 2856 2857This shader uses Unity's surface shader framework, which makes it quite flexible, but also more demanding on the GPU. 2858 2859#### Properties 2860![Example image](../images/TMP_Shader_DFS_Inspector.png) 2861 2862![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the appearance of the text face. 2863 2864![Example image](../images/Letter_B_half.png) **[Outline](#Outline):** Controls the appearance of the text outline. 2865 2866![Example image](../images/Letter_C_half.png) **[Glow](#Glow):** Adds a smooth outline to the text in order to simulate glow. 2867 2868![Example image](../images/Letter_D_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 2869 2870<a name="Face"></a> 2871##### Face 2872 2873You edit Distance Field Surface shader properties in the TextMesh Pro object Inspector. Properties are divided into several sections, some of which you must enable in order to activate the property group. 2874 2875![Example image](../images/TMP_Shader_DFS_Face.png) 2876 2877| Property: || Description | 2878|--------------|---|-------------| 2879| **Color** ||Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 2880| **Texture** ||Apply a texture to the text face.<br/><br/>The texture is multiplied with the face **Color** and the vertex colors in the TextMesh Pro component to produce the final face color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text face.| 2881| **Tiling** ||Increase these values to repeat the texture across the text surface, in accordance with the TextMesh Pro object's **Horizontal Mapping** and **Vertical Mapping** properties.| 2882| **Offset** ||Adjust these values to change the texture's relative position, horizontally or vertically, on the text surface.| 2883| **Speed** ||Animate the face texture by setting a value greater than **0**.<br/><br/>The resulting animation is a scrolling effect as the texture’s UV coordinates change over time.<br/><br/>**Note:** To see this effect in the Scene view, you must enable **Animated Materials** from the Effects menu in the [Scene view control bar](https://docs.unity3d.com/Manual/ViewModes.html).| 2884| **Softness** ||Adjust the softness of the text edges.<br/><br/>A value of **0** produces crisp, anti-aliased edges.<br/><br/>Values greater than **0** produce increasingly soft/blurry edges.<br/><br/>This setting applies to both the text face and the outline.| 2885| **Dilate** ||Adjust the position of the text contour in the font [distance field](FontAssetsSDF.md).<br/><br/>A value of **0** places the contour halfway, which corresponds to the contour of the original font.<br/><br/>Negative values thin the characters, while positive values thicken them.| 2886| **Gloss** ||Adjust the glossiness of the text face. <br/><br/> Glossiness determines the appearance of specular highlights when light hits the text. Higher values produce smaller specular highlights.| 2887 2888<a name="Outline"></a> 2889##### Outline 2890 2891Description 2892 2893![Example image](../images/TMP_Shader_DFS_Outline.png) 2894 2895| Property: |Description | 2896|--------------|------------| 2897| **Color** |Adjust the color for the text outline.<br/><br/>Tthe outline is not visible unless you set a **Thickness** value greater than **0**.| 2898| **Texture** |Apply a texture to the text outline.<br/><br/>The texture is multiplied with the outline **Color** to produce the final outline color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text outline.| 2899| **Tiling** | | 2900| **Offset** | | 2901| **Speed** |Animate the outline texture by setting a value greater than 0.<br/><br/>The resulting animation is a scrolling effect as the texture’s UV coordinates change over time.<br/><br/>**Note:** To see this effect in the Scene view, you must enable **Animated Materials** from the Effects menu in the [Scene view control bar](https://docs.unity3d.com/Manual/ViewModes.html).| 2902| **Thickness** |Adjust the thickness of the outline. The higher the value, the thicker the line.<br/><br/>The outline is drawn on the text contour, with half its thickness inside the contour and half of it outside the contour.<br/><br/>You can pull it farther in or push it farther out by adjusting the **Face > Dilate** property.| 2903| **Gloss** |Adjust the glossiness of the text outline. <br/><br/> Glossiness determines the appearance of specular highlights when light hits the text. Higher values produce smaller specualr highlights.| 2904 2905<a name="Glow"></a> 2906##### Glow 2907 2908The **Glow** effect adds a smooth outline on top of other text effects, which is typically used to suggest a glow. The effect is additive, so it is more noticeable on dark backgrounds. 2909 2910When the glow extends beyond the text boundary, the surface shader shades it as if it were part of the solid text, meaning that it gets simulated lighting effects such as specular highlights. 2911 2912![Example image](../images/TMP_Shader_DFS_Glow.png) 2913 2914| Property: |Description | 2915|--------------|------------| 2916| **Color** |Set the tint and strength of the glow effect by adjusting the **Color** and **Alpha** values respectively. | 2917| **Offset** | Adjust the center of the glow effect.<br/><br/>A value of **0** places the center of the glow effect right on the text contour.<br/><br/>Positive values move the center out from the contour. Negative values move it in toward the center of the text. | 2918| **Inner** | Control how far the glow effect extends inward from the its start point (text contour + **Offset**). | 2919| **Outer** | Control how far the glow effect extends outward from the text contour (text contour + Offset). | 2920| **Power** | Control how the glow effect falls off from its center to its edges.<br/><br/>A value of **1** produces a strong, bright glow effect with a sharp linear falloff.<br/><br/>Lower values produce a glow effect with a quick drop in intensity followed by a more gradual falloff. | 2921 2922<a name="DebugSettings"></a> 2923##### Debug Settings 2924 2925The debug section exposes some of the shader’s internal properties. They can be helpful for troubleshooting problems you encounter with the shader. 2926 2927 2928![Example image](../images/TMP_Shader_DFS_Debug.png) 2929 2930| Property: | | Description | 2931|----------------------------------|-----------|-------------| 2932| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 2933| **Gradient Scale** | |Represents the spread / range of the font’s [signed distance field](FontAssetsSDF.md).<br/><br/>This determines the effective range of material properties such as **Outline > Width** and **Underlay > Offset X/Y**.<br/><br/>This value is equal to Padding +1, with Padding being the **Padding** value set when the font Asset was created.<br/><br/>**Note:** This value is displayed for debugging purposes. You should not edit it manually. | 2934| **Texture Width/Texture Height** | | Displays the texture atlas width and height specified in the **Atlas Resolution** settings when the font Asset was created. | 2935| **Scale X/Scale X** | | Set multipliers for the SDF scale.<br/><br/>When set to **0**, characters are rendered as blocks.<br/><br/>Negative values soften the characters, while positive values make them appear sharper. | 2936| **Perspective Filter** | | When using a perspective camera, adjust this setting to make text look softer when viewed at sharp angles.<br/><br/>The default setting of **0.875** is adequate in most cases.<br/><br/>When using orthographic cameras, set this to **0**. | 2937| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 2938 2939 2940---- 2941_NEW FILE:_ ShadersBitmap.md 2942 2943 2944<a name="ShadersBitmap.md"></a> 2945### Bitmap Shader 2946 2947The Bitmap shader is designed to use bitmap-only fonts. It treats the font atlas like a regular texture, displaying it directly, and does not support any text effects. Bitmap-textured text becomes blocky when you zoom in on it. 2948 2949#### Properties 2950 2951![Example image](../images/TMP_Shader_Bitmap.png) 2952 2953![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the text's overall appearance. 2954 2955![Example image](../images/Letter_B_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 2956 2957<a name="Face"></a> 2958##### Face 2959 2960Description 2961 2962 2963| Property: | Description | 2964|--------------|-------------| 2965| **Color** |Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 2966| **Texture** |Apply a texture to the text face.<br/><br/>The texture is multiplied with the face **Color** and the vertex colors in the TextMesh Pro component to produce the final face color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text face.| 2967| **Tiling X/Y** ||Increase these values to repeat the texture across the text surface, in accordance with the TextMesh Pro object's **Horizontal Mapping** and **Vertical Mapping** properties.| 2968| **Offset X/Y** ||Adjust these values to change the texture's relative position, horizontally or vertically, on the text surface.| 2969 2970<a name="DebugSettings"></a> 2971##### Debug Settings 2972 2973The debug section exposes some of the shader’s internal properties. They can be helpful for troubleshooting problems you encounter with the shader. 2974 2975| Property: | | Description | 2976|----------------------------------|-----------|-------------| 2977| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 2978| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 2979| **Softness X/Softness Y** | | When **Mask** is set to **Soft**, set these to adjust the softness of the edge of the text. | 2980| **Clip Rect** | | Clip Rect defines the Left (**L**), Bottom (**B**), Right (**R**) and Top (**T**) world space coordinates of the masking rectangle.<br/><br/> This is normally set automatically by the **2D RectMask**. However when using a normal **TextMeshPro** component, this allows you to set / control the masking region. | 2981| **Stencil ID** | | | 2982| **Stencil Comp** | | | 2983 2984 2985---- 2986_NEW FILE:_ ShadersBitmapCustomAtlas.md 2987 2988 2989<a name="ShadersBitmapCustomAtlas.md"></a> 2990### Bitmap Custom Atlas Shader 2991 2992The Bitmap shader is designed to use bitmap-only fonts. It treats the font atlas like a regular texture, displaying it directly, and does not support any text effects. Bitmap-textured text becomes blocky when you zoom in on it. 2993 2994#### Properties 2995 2996![Example image](../images/TMP_Shader_BitmapCustomAtlas.png) 2997 2998![Example image](../images/Letter_A_half.png) **[Face](#Face):** Controls the text's overall appearance. 2999 3000![Example image](../images/Letter_B_half.png) **[Debug Settings](#DebugSettings):** Exposes internal shader properties that are sometimes useful for troubleshooting. 3001 3002<a name="Face"></a> 3003##### Face 3004 3005Description 3006 3007 3008| Property: | Description | 3009|--------------|-------------| 3010| **Color** |Adjust the face color of the text.<br/><br/>The value you set here is multiplied with the vertex **Colors** you set in the TextMeshPro component.<br/><br/>Set this to white to use the original vertex colors.<br/><br/>Set this to black to cancel out the vertex colors.<br/><br/>Similarly, setting the Alpha to **1** uses the original vertex-color alpha, while setting it to **0** removes any alpha set in the original vertex colors.| 3011| **Texture** |Apply a texture to the text face.<br/><br/>The texture is multiplied with the face **Color** and the vertex colors in the TextMesh Pro component to produce the final face color.<br/><br/>The **Horizontal Mapping** and **Vertical Mapping** properties in the TextMesh Pro component determine how TextMesh Pro fits the texture to the text face.| 3012| **Tiling X/Y** ||Increase these values to repeat the texture across the text surface, in accordance with the TextMesh Pro object's **Horizontal Mapping** and **Vertical Mapping** properties.| 3013| **Offset X/Y** ||Adjust these values to change the texture's relative position, horizontally or vertically, on the text surface. | 3014 3015<a name="DebugSettings"></a> 3016##### Debug Settings 3017 3018The debug section exposes some of the shader’s internal properties. They can be helpful for troubleshooting problems you encounter with the shader. 3019 3020| Property: | | Description | 3021|----------------------------------|-----------|-------------| 3022| **Font Atlas** | | Points to the atlas texture used by the font Asset. | 3023|Padding | | | 3024| **Offset X/Offset Y** | | Offset the vertex positions of each character in X and Y.<br/><br/>You can change these values using a script to create simulated crawl or scrolling FX. | 3025| **Softness X/Softness Y** | | When **Mask** is set to **Soft**, set these to adjust the softness of the edge of the text. | 3026| **Clip Rect** | | Clip Rect defines the Left (**L**), Bottom (**B**), Right (**R**) and Top (**T**) world space coordinates of the masking rectangle.<br/><br/> This is normally set automatically by the **2D RectMask**. However when using a normal **TextMeshPro** component, this allows you to set / control the masking region. | 3027| **Stencil ID** | | | 3028| **Stencil Comp** | | | 3029 3030 3031---- 3032_NEW FILE:_ Shaders.md 3033 3034 3035<a name="Shaders.md"></a> 3036### Shaders 3037 3038TextMesh Pro has been designed to take advantage of signed distance field (SDF) rendering and includes a collection of shaders for this purpose. There are also bitmap-only shaders, in case you don't want to use SDF rendering. 3039 3040All shaders have a desktop and a mobile version. The mobile versions are less demanding and suitable for mobile devices, but support fewer effects. All shaders can be found in the shader menu under TextMeshPro and TextMeshPro / Mobile. 3041 3042#### SDF Shaders 3043 3044There are three variants of the SDF shader, known as Distance Field, Distance Field (Surface), and Distance Field Overlay. The regular and overlay shaders are unlit, so they don't interact with the Scene lighting. They can support locally simulated lighting effects instead. 3045 3046The surface shader versions do interact with the Scene lighting. They use Unity's surface shader framework and are quite flexible, but also more demanding on the GPU. They are not physically based shaders. 3047 3048SDF shaders can use the distance data to generate special effects, like outlines, underlays, and bevels. These effects often increase the visual size of the text. When taken to their extremes, you might see artifacts appear around the edges of character sprites. If this happens, scale down the effects. For example, a soft dilated underlay with large offsets might take things too far. 3049 3050The artifacts occur because data from adjacent characters in the font atlas will bleed into the current character. You can increase the padding when importing a font to give the effects more space. 3051 3052#### Bitmap Shaders 3053 3054 3055---- 3056_NEW FILE:_ ShadersSprite.md 3057 3058 3059<a name="ShadersSprite.md"></a> 3060### Sprite Shader 3061 3062 3063 3064#### Properties 3065 3066|Property:||Function:| 3067|--|--|--| 3068|**Sprite Texture** | | | 3069|**Tiling X/Y** | | | 3070|**Offset X/Y** | | | 3071|**Tint** | | | 3072|**Stencil Comparison** | | | 3073|**Stencil ID** | | | 3074|**Stencil Operation** | | | 3075|**Stencil Write Mask** | | | 3076|**Stencil Read Mask** | | | 3077|**Color Mask** | | | 3078|**Clip Rect** | | | 3079|**Use Alpha Clip** | | | 3080|**Render Queue** | | | 3081| |From Shader | | 3082| |Geometry | | 3083| |Alpha Test | | 3084| |Transparent | | 3085|Double Sided Global Illumination | | | 3086 3087 3088---- 3089_NEW FILE:_ Settings.md 3090 3091 3092<a name="Settings.md"></a> 3093# Settings 3094 3095TextMesh Pro’s project-wide settings are stored in a special Asset named TMP Settings. This Asset must be stored in a Resources folder. By default it’s in the `Assets/TextMesh` Pro folder. 3096 3097To edit the settings, either select the Asset in the Project View or open the **Project Settings** window and choose **TextMesh Pro** from the category list. 3098 3099![Example image](../images/TMP_Settings_Inspector.png)<br/> 3100_TextMesh Pro Settings_ 3101 3102The Settings are divided into the following groups: 3103 3104|Group:|Function:| 3105|-|-| 3106|**A** | **[Default Font Asset](#default-font-asset):** Set the default font for text objects. | 3107|**B** | **[Fallback Font Assets](#fallback-font-assets):** Choose font assets to search when TexMesh Pro can’t find a character in a text object’s main font Asset. | 3108|**C** | **[Fallback Material Settings](#fallback-material-settings):** Set style options for characters retrieved from fallback fonts. | 3109|**D** | **[Dynamic Font System Settings](#dynamic-font-system-settings):** Set options for handling missing characters. | 3110|**E** | **[Text Container Default Settings](#text-container-default-settings):** Control the size of the text container for new text objects. | 3111|**F** | **[Text Component Default Settings](#text-component-default-settings):** Set the basic text formatting options for new text objects. | 3112|**G** | **[Default Sprite Asset](#default-sprite-asset):** Choose a default Sprite Asset to use for for rich text sprite tags that do not specify an Asset, and set other sprite-related options. | 3113|**H** | **[Default Style Sheet](#default-style-sheet):** Choose a default style sheet. | 3114|**I** | **[Color Gradient Presets](#color-gradient-presets):** Choose a location to store color gradient presets. | 3115|**J** | **[Line Breaking for Asian Languages](#line-breaking-for-asian-languages):** Define leading and following characters in order to get proper line breaking when using Asian fonts. | 3116 3117## Default Font Asset 3118 3119![Example image](../images/TMP_Settings_DefaultFontAsset.png) 3120 3121|Property:|Function:| 3122|---------|---------| 3123|**Default Font Asset**|Specify the default font used when you create a new text object. 3124|**Path**|Specify where to store font assets.<br/><br/>The **Path** must point to a subfolder of a Resources folder.| 3125 3126## Fallback Font Assets 3127 3128When a text object contains a character that is not in its font Asset, TextMesh Pro searches these font assets for the glyph. If the object’s font assets has a local fallback font list, TextMesh Pro searches the fonts in that list first. 3129 3130![Example image](../images/TMP_Settings_FallbackFontAssets.png) 3131 3132|Property:|Function:| 3133|-|-| 3134|**Fallback Font Assets List**|Manage the global fallback font assets.<br/><br/>Click **+** and **-** to add and remove font slots.<br/><br/>Click the circle icon next to a font to choose a font Asset using the Object Picker.<br/><br/>Drag the handles on the left side of any font Asset to reorder the list.| 3135 3136## Fallback Material Settings 3137 3138![Example image](../images/TMP_Settings_FallbackMaterialSettings.png) 3139 3140|Property:|Function:| 3141|-|-| 3142|**Match Material Presets**|Enable this setting to make glyphs from the fallback font match the style of the main font.<br/><br/>When TextMesh Pro uses a glyph from a fallback font, it creates a material with the same settings as the main font’s material.<br/><br/>This looks best when the main font and the fallback font are similar.| 3143 3144## Dynamic Font System Settings 3145 3146These are project-wide settings for handling missing glyphs. 3147 3148![Example image](../images/TMP_Settings_DynamicFontSystemSettings.png) 3149 3150|Property:|Function:| 3151|-|-| 3152|**Get Font Features at Runtime** | | 3153|**Replacement**|Specify the ID of the character to use when TextMesh Pro cannot find a missing glyph in any of the fallback fonts.<br/><br/>The default value of 0 produces the outline of a square.| 3154|**Disable Warnings**|Enable this setting to prevent Unity from logging a warning for every missing glyph.| 3155 3156## Text Container Default Settings 3157 3158These settings define the default size for text containers in new text objects. 3159 3160![Example image](../images/TMP_Settings_TextContainerDefaultSettings.png) 3161 3162|Property:|Function:| 3163|-|-| 3164|**TextMeshPro**|Set the default size of text containers for new TextMesh Pro 3D GameObjects, in Unity units.| 3165|**TextMeshPro UI**|Set the default size of text containers for new TextMesh Pro UI GameObjects, in Unity units.| 3166|**Enable Raycast Target** | Enable this option to make TextMesh Pro GameObjects targets for raycasting by default. <br/><br/> When you disable this option, the UI ignores TextMesh Pro GameObjects by default when determining what the cursor interacts with. | 3167|**Auto Size Text Container**|Enable this option to automatically size text containers to fit the text when creating new TextMesh Pro UI GameObjects.| 3168 3169## Text Component Default Settings 3170 3171These settings define default values for new text objects. After adding a text object to the Scene, you can adjust these settings in the object's TextMesh Pro Inspector. 3172 3173![Example image](../images/TMP_Settings_TextComponentDefaultSettings.png) 3174 3175|Property:|Function:| 3176|-|-| 3177|**Default Font Size**|Set the default font size, in points.| 3178|**Text Auto Size Ratios**|Set the default **Min** to **Max** size ratio TextMesh Pro uses when it [sets font size automatically](TMPObjectUIText.md#font).| 3179|**Word Wrapping**|Enable this option to turn word wrapping on for all new text objects.| 3180|**Kerning**|Enable this option to toggle kerning on for all new text objects.<br/><br/>If new objects use a font with no kerning data, enabling this setting has no effect.| 3181|**Extra Padding**|Enable this option to add extra padding to character sprites.<br/><br/>TextMesh Pro creates sprites to fit the visible text, but the results aren't always perfect. This setting reduces the chances that glyphs are cut off at the boundaries of their sprites.| 3182|**Tint All Sprites**|By default, sprites aren't affected by the text's vertex colors. Enable Tint All Sprites changes this.| 3183|**Parse Escape Sequence**|Enable this option to make TextMesh Pro interpret backslash-escaped characters as special characters.<br/><br/>For example `\n` is interpreted as a newline, `\t` as a tab, and so on.<br/><br/>**Note:** This applies to rendered text. In code, escaped characters are already parsed by the compiler.| 3184 3185## Default Sprite Asset 3186 3187 3188![Example image](../images/TMP_Settings_DefaultSpriteAsset.png) 3189 3190|Property:|Function:| 3191|-|-| 3192|**Default Sprite Asset** | Choose the [Sprite Asset](Sprites.md) for TextMesh Pro GameObjects to use by default. | 3193|**IOS Emoji Support** | Toggle support for iOS emoji. | 3194|**Path** | Specify where to store Sprite Assets.<br/><br/>The **Path** must point to a subfolder of a Resources folder. | 3195 3196## Default Style Sheet 3197 3198![Example image](../images/TMP_Settings_DefaultStyleSheet.png) 3199 3200|Property:|Function:| 3201|-|-| 3202|**Default Style Sheet**|You can choose a single [style sheet](StyleSheets.md) Asset, which is used by all text objects in the project.| 3203 3204## Color Gradient Presets 3205 3206![Example image](../images/TMP_Settings_ColorGradientPresets.png) 3207 3208|Property:|Function:| 3209|-|-| 3210|**Path**|| 3211 3212## Line Breaking for Asian Languages 3213 3214To obtain correct line-breaking behavior for Asian languages, you must specify which characters behave as leading and following characters. This is done via two text assets. 3215 3216![Example image](../images/TMP_Settings_LineBreakingforAsianLanguages.png) 3217 3218|Property:|Function:| 3219|-|-| 3220|**Leading Characters**|Specify the text file that contains the list of leading characters.| 3221|**Following Characters**|Specify the text file that contains the list of following characters.|