fit_text
Stop text overflow in PowerPoint: shrink overflowing text to fit its shape by estimating a uniform font scale, rewriting run sizes or applying normAutofit, and enabling autofit for one shape or the whole slide.
Instructions
Shrink overflowing text to fit: estimates the largest uniform font scale (floor min_size pt) via an average-glyph-width heuristic, rewrites explicit run sizes (or writes a normAutofit fontScale when sizes are inherited), and enables normAutofit. shape=None fits every overflowing text shape on the slide; one that cannot fit at min_size reports still_overflowing. An ESTIMATE (no font metrics): verify with export_slide_images (assembly-export pack). Saves atomically with two-slot backup; backup=False skips rotation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shape | No | ||
| slide | Yes | ||
| backup | No | ||
| min_size | No | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||