Autofit

Describes the autofit settings of a shape. If a change is made that might affect text fitting
within its bounding text box:

- Autofit is deactivated and set to `https://developers.google.com/apps-script/reference/slides/autofit-type#NONE`.
- The font scale is reset to the default value and applied to the font size.
- The line spacing reduction is reset to the default value and applied to the line spacing.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/slides/autofit#disableAutofit()` | `https://developers.google.com/apps-script/reference/slides/autofit#` | Sets the `https://developers.google.com/apps-script/reference/slides/autofit-type` of a shape to `https://developers.google.com/apps-script/reference/slides/autofit-type#NONE`. |
| `https://developers.google.com/apps-script/reference/slides/autofit#getAutofitType()` | `https://developers.google.com/apps-script/reference/slides/autofit-type` | Gets the `https://developers.google.com/apps-script/reference/slides/autofit-type` of the shape. |
| `https://developers.google.com/apps-script/reference/slides/autofit#getFontScale()` | `Number` | Gets the font scale applied to the shape. |
| `https://developers.google.com/apps-script/reference/slides/autofit#getLineSpacingReduction()` | `Number` | Gets the line spacing reduction applied to the shape. |

## Detailed documentation

### `disableAutofit()`

Sets the `https://developers.google.com/apps-script/reference/slides/autofit-type` of a shape to `https://developers.google.com/apps-script/reference/slides/autofit-type#NONE`.

#### Return


`https://developers.google.com/apps-script/reference/slides/autofit#` --- The autofit, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getAutofitType()`

Gets the `https://developers.google.com/apps-script/reference/slides/autofit-type` of the shape.

#### Return


`https://developers.google.com/apps-script/reference/slides/autofit-type` --- The autofit type.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getFontScale()`

Gets the font scale applied to the shape. For shapes with `https://developers.google.com/apps-script/reference/slides/autofit-type` `https://developers.google.com/apps-script/reference/slides/autofit-type#NONE` or `https://developers.google.com/apps-script/reference/slides/autofit-type#SHAPE_AUTOFIT`, this value is the default value of 1.
For `https://developers.google.com/apps-script/reference/slides/autofit-type#TEXT_AUTOFIT`, the value returned is what the original font size is
multiplied by to fit within the shape.

#### Return


`Number` --- The font scale.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getLineSpacingReduction()`

Gets the line spacing reduction applied to the shape. For shapes with `https://developers.google.com/apps-script/reference/slides/autofit-type`
`https://developers.google.com/apps-script/reference/slides/autofit-type#NONE` or `https://developers.google.com/apps-script/reference/slides/autofit-type#SHAPE_AUTOFIT`, this value is the default value
of 0. For `https://developers.google.com/apps-script/reference/slides/autofit-type#TEXT_AUTOFIT`, the returned value is the amount of spacing
subtracted from the original spacing to make the text fit within the shape.

#### Return


`Number` --- The line spacing.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`