Arrange text in this text frame to fit inside its extents. This is accomplished by setting auto size off, wrap on, and setting the font of all its text to `font_family`, `font_size`, `is_bold`, and `is_italic`.
(self, font_family: str, font_size: int, is_bold: bool, is_italic: bool)
| 217 | }[value] |
| 218 | |
| 219 | def _apply_fit(self, font_family: str, font_size: int, is_bold: bool, is_italic: bool): |
| 220 | """Arrange text in this text frame to fit inside its extents. |
| 221 | |
| 222 | This is accomplished by setting auto size off, wrap on, and setting the font of |
| 223 | all its text to `font_family`, `font_size`, `is_bold`, and `is_italic`. |
| 224 | """ |
| 225 | self.auto_size = MSO_AUTO_SIZE.NONE |
| 226 | self.word_wrap = True |
| 227 | self._set_font(font_family, font_size, is_bold, is_italic) |
| 228 | |
| 229 | def _best_fit_font_size( |
| 230 | self, family: str, max_size: int, bold: bool, italic: bool, font_file: str | None |