# TextGenerationSettings

> A struct that stores the settings for TextGeneration.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.TextRenderingModule

```csharp
public struct TextGenerationSettings
```

## Fields

| Value                                                                                                              | Description                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [alignByGeometry](/engine/6000.6/script-reference/unityengine/textgenerationsettings/alignbygeometry.md)           | Use the extents of glyph geometry to perform horizontal alignment rather than glyph metrics.                                                                                                                                   |
| [color](/engine/6000.6/script-reference/unityengine/textgenerationsettings/color.md)                               | The base color for the text generation.                                                                                                                                                                                        |
| [font](/engine/6000.6/script-reference/unityengine/textgenerationsettings/font.md)                                 | Font to use for generation.                                                                                                                                                                                                    |
| [fontSize](/engine/6000.6/script-reference/unityengine/textgenerationsettings/fontsize.md)                         | Font size.                                                                                                                                                                                                                     |
| [fontStyle](/engine/6000.6/script-reference/unityengine/textgenerationsettings/fontstyle.md)                       | Font style.                                                                                                                                                                                                                    |
| [generateOutOfBounds](/engine/6000.6/script-reference/unityengine/textgenerationsettings/generateoutofbounds.md)   | Continue to generate characters even if the text runs out of bounds.                                                                                                                                                           |
| [generationExtents](/engine/6000.6/script-reference/unityengine/textgenerationsettings/generationextents.md)       | Extents that the generator will attempt to fit the text in.                                                                                                                                                                    |
| [horizontalOverflow](/engine/6000.6/script-reference/unityengine/textgenerationsettings/horizontaloverflow.md)     | What happens to text when it reaches the horizontal generation bounds.                                                                                                                                                         |
| [lineSpacing](/engine/6000.6/script-reference/unityengine/textgenerationsettings/linespacing.md)                   | The line spacing multiplier.                                                                                                                                                                                                   |
| [pivot](/engine/6000.6/script-reference/unityengine/textgenerationsettings/pivot.md)                               | Generated vertices are offset by the pivot.                                                                                                                                                                                    |
| [resizeTextForBestFit](/engine/6000.6/script-reference/unityengine/textgenerationsettings/resizetextforbestfit.md) | Should the text be resized to fit the configured bounds?                                                                                                                                                                       |
| [resizeTextMaxSize](/engine/6000.6/script-reference/unityengine/textgenerationsettings/resizetextmaxsize.md)       | Maximum size for resized text.                                                                                                                                                                                                 |
| [resizeTextMinSize](/engine/6000.6/script-reference/unityengine/textgenerationsettings/resizetextminsize.md)       | Minimum size for resized text.                                                                                                                                                                                                 |
| [richText](/engine/6000.6/script-reference/unityengine/textgenerationsettings/richtext.md)                         | Allow rich text markup in generation.                                                                                                                                                                                          |
| [scaleFactor](/engine/6000.6/script-reference/unityengine/textgenerationsettings/scalefactor.md)                   | A scale factor for the text. This is useful if the [Text](/engine/6000.6/manual/best-practice-guides/bpg-uiad-index/text.md) is on a [Canvas](/engine/6000.6/script-reference/unityengine/canvas.md) and the canvas is scaled. |
| [textAnchor](/engine/6000.6/script-reference/unityengine/textgenerationsettings/textanchor.md)                     | How is the generated text anchored.                                                                                                                                                                                            |
| [updateBounds](/engine/6000.6/script-reference/unityengine/textgenerationsettings/updatebounds.md)                 | Should the text generator update the bounds from the generated text.                                                                                                                                                           |
| [verticalOverflow](/engine/6000.6/script-reference/unityengine/textgenerationsettings/verticaloverflow.md)         | What happens to text when it reaches the bottom generation bounds.                                                                                                                                                             |
