TextStyle
Overview
TextStyle is a class in Aspose.Note for Python.
TextStyle.Default returns a TextStyle instance initialized with default formatting.
TextStyle stores the character-level formatting for a TextRun. Properties include font name, font size (in points), bold, italic, underline, strikethrough, superscript, subscript, text color, highlight color, and hyperlink URL. A shared ParagraphStyle is used for paragraph-level defaults; individual runs override those defaults via their own TextStyle.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
IsHyperlink | bool | Read | Indicates whether the text is a hyperlink |
HyperlinkAddress | str | None | Read | Contains the hyperlink URL or None |
FontName | str | None | Read | Stores the name of the font applied to the text |
FontSize | float | None | Read | Stores the font size in points |
FontColor | int | None | Read | Holds the text color as an ARGB integer |
Highlight | int | None | Read | |
Language | int | None | Read | Stores the language identifier as an integer |
IsBold | bool | Read | Indicates if the text is rendered in bold |
IsItalic | bool | Read | Indicates if the text is rendered in italic |
IsUnderline | bool | Read | Indicates if the text is underlined |
IsStrikethrough | bool | Read | Indicates if the text has a strikethrough |
IsSuperscript | bool | Read | Indicates if the text is superscript |
IsSubscript | bool | Read | Indicates if the text is subscript |
IsHidden | bool | Read | Indicates if the text is hidden |
IsMathFormatting | bool | Read | Indicates if the text uses math formatting |
FontStyle | int | Read | Stores numeric flags representing combined font style attributes |
Methods
| Signature | Description |
|---|---|
__init__(IsHyperlink: bool, HyperlinkAddress: str | None, FontName: str | None, FontSize: float | None, FontColor: int | None, Highlight: int | None, Language: int | None, IsBold: bool, IsItalic: bool, IsUnderline: bool, IsStrikethrough: bool, IsSuperscript: bool, IsSubscript: bool, IsHidden: bool, IsMathFormatting: bool) | |
Default() → TextStyle | Returns a TextStyle instance initialized with default formatting |
DefaultMsOneNoteTitleTextStyle() → TextStyle | Returns a TextStyle preset for OneNote title text |
DefaultMsOneNoteTitleDateStyle() → TextStyle | Returns a TextStyle preset for OneNote title date |
DefaultMsOneNoteTitleTimeStyle() → TextStyle | Returns a TextStyle preset for OneNote title time |