Set font type and size

  1. Find the shape name you want to update. See here to find shape names.

  2. Specify the text need amending under text_run. Text within one textbox can be split into multiple chunks.

  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.

Before and after:

Template Presentation

JSON Payload

{
  "presentation": {
    "template": "slides_as_template_text_font_size.pptx",
    "export_version": "Pptx2010",
    "slides": [
      {
        "type": "slide",
        "slide_index": 0,
        "shapes": [
          {
            "name": "Title 1",
            "text_content": [
              {
                "text_run": "Text font",
                "text_properties": {
                  "font_type": "Arial",
                  "new_line": true
                }
              },
              {
                "text_run": "Text font",
                "text_properties": {
                  "font_size": 32,
                  "new_line": true
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

Last updated