Read/write. A |CharacterStyle| object representing the character style applied to this run. The default character style for the document (often `Default Character Font`) is returned if the run has no directly-applied character style. Setting this property to |None| r
(self)
| 187 | |
| 188 | @property |
| 189 | def style(self) -> CharacterStyle: |
| 190 | """Read/write. |
| 191 | |
| 192 | A |CharacterStyle| object representing the character style applied to this run. |
| 193 | The default character style for the document (often `Default Character Font`) is |
| 194 | returned if the run has no directly-applied character style. Setting this |
| 195 | property to |None| removes any directly-applied character style. |
| 196 | """ |
| 197 | style_id = self._r.style |
| 198 | return cast(CharacterStyle, self.part.get_style(style_id, WD_STYLE_TYPE.CHARACTER)) |
| 199 | |
| 200 | @style.setter |
| 201 | def style(self, style_or_name: str | CharacterStyle | None): |
nothing calls this directly
no test coverage detected