> 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/set-font-type-and-size.md). Agents can also search and read this documentation through its [MCP server](https://docs.powerpointgeneratorapi.com/~gitbook/mcp).

# Set font type and size

1. Select the shape by `name` you want to modify. See [here](https://docs.powerpointgeneratorapi.com/knowledge-base/finding-shape-names.md) to find shape names.
2. Specify the text need amending under `text_run`. Text within one textbox can be split into multiple chunks. &#x20;
3. Add font setting `font_type` or font size setting `font_size` for selected text under `text_properties`.
4. Insert `new_line` as boolean before another `text_run`.&#x20;

Before and after:

![](https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2F8E0P2LL9Xous1UwO53nB%2Fslides_as_template_text_font_size.png?alt=media\&token=514927a6-b67e-4fad-8857-9e94a2462d50)![](https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2FOQ7DLyCLHCPA61bt2oZT%2Fslides_as_template_text_font_size1.png?alt=media\&token=eb8e22ea-015d-4a0a-8dc9-0a53fd691e0e)

Template Presentation

{% file src="/files/yhJxMMOWNqbRfyLpZlDF" %}

JSON Payload

{% code lineNumbers="true" %}

```json
{
  "presentation": {
    "template": "slides_as_template_text_font_size.pptx",
    "slides": [
      {
        "slide_index": 0,
        "shapes": [
          {
            "name": "Title 1",
            "text": [
              {
                "text_run": "Text font\n",
                "text_properties": {
                  "font_type": "Arial",
                  "font_size": 32
                }
              },
              {
                "text_run": "Text font",
                "text_properties": {
                  "font_type": "Arial",
                  "font_size": 25
                }
              }
            ]
          }
        ]
      }
    ]
  }
}
```

{% endcode %}
