> For the complete documentation index, see [llms.txt](https://docs.powerpointgeneratorapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powerpointgeneratorapi.com/examples/text-shape/text-styling.md).

# Text styling

1. Select the shape by `name` you want to modify. See [here](/knowledge-base/finding-shape-names.md) to find shape names.
2. Use the `text` property to define one or more **text runs** — each run can have its own visual properties.
3. Each text run uses the `text_run` field to define content, and the `text_properties` field to specify styling such as:
   1. `font_type`, `font_size`, `font_color`
   2. `font_bold`, `font_italic`, `font_underline`
   3. `text_align`, `font_bg_color`, and `new_line` (to start a new line)
4. Use `settings` for general text box configuration such as line spacing, alignment, and vertical positioning.

Reference: [textbox](/json-template-syntax/shapes/textbox.md#settings-object)

Download: [input.zip](https://drive.google.com/uc?export=download\&id=1GfNyIgUysOA4J6YOmJuZPGYtpQFohADW) | [output.pptx](https://drive.google.com/uc?export=download\&id=1nMTWN05aloRWCPXFsOYv4ceA0IOghjYW)

{% columns %}
{% column width="41.66666666666667%" %}

<figure><img src="/files/p2tD3HVmuVhDaWIwqt3A" alt=""><figcaption></figcaption></figure>

***

<figure><img src="/files/wLbp1BVyG9XzyHRWwqrD" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="58.33333333333333%" %}
{% code lineNumbers="true" %}

```json
{
  "presentation": {
    "template": "template.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "name": "TextBox 1",
            "text": [
              {
                "text_run": "Courier New ",
                "text_properties": {
                  "font_type": "Courier New",
                  "font_size": 36,
                  "font_color": "114, 225, 210"
                }
              },
              {
                "text_run": "36",
                "text_properties": {
                  "font_type": "Courier New",
                  "font_size": 36,
                  "font_color": "255, 255, 0",
                  "new_line":true 
                }
              },
              {
                "text_run": "Italic Arial ",
                "text_properties": {
                  "font_type": "Arial",
                  "font_italic": true,
                  "font_size": 48,
                  "font_color": "242, 174, 247"
                }
              },
              {
                "text_run": "28",
                "text_properties": {
                  "font_type": "Arial",
                  "font_italic": true,
                  "font_size": 28,
                  "font_color": "0, 176, 80",
                  "text_align": "right",
                  "new_line":true 
                }
              },
              {
                "text_run": "Bold Verdana ",
                "text_properties": {
                  "font_type": "Verdana",
                  "font_bold": true,
                  "font_size": 28,
                  "font_color": "241, 194, 50"
                }
              },
              {
                "text_run": "50",
                "text_properties": {
                  "font_type": "Verdana",
                  "font_bold": true,
                  "font_size": 28,
                  "font_color": "112, 48, 160",
                  "font_bg_color": "#817463",
                  "new_line":true 
                }
              },
              {
                "text_run": "Alignment right",
                "text_properties": {
                  "font_type": "Forte",
                  "font_size": 20,
                  "text_align": "right",
                  "font_color": "255, 255, 255",
                  "font_bg_color": "#817463",
                  "new_line":true 
                }
              },
              {
                "text_run": "Underline",
                "text_properties": {
                  "font_type": "Segoe Script",
                  "font_size": 36,
                  "text_align": "center",
                  "font_underline": "single",
                  "font_color": "0, 176, 240",
                  "new_line":true
                }
              },
              {
                "text_run": "Text highlight ",
                "text_properties": {
                  "font_type": "Impact",
                  "font_size": 20,
                  "text_align": "left",
                  "font_color": "orange",
                  "font_bg_color": "#00ff00"
                }
              }
            ]
          },
          {
            "name": "TextBox 2",
            "text": "First line\nSecond line\nThird line\nFourth line",
            "settings": {
              "text_line_spacing": 1.5,
              "vertical_anchor": "middle",
              "font_type": "Courier New",
              "font_size": 15,
              "font_bold": true,
              "font_italic": true,
              "text_align": "center",
              "font_color": "114, 225, 210"
            }
          }
        ]
      }
    ]
  }
}
```

{% endcode %}
{% endcolumn %}
{% endcolumns %}
