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

NameTypeAccessDescription
IsHyperlinkboolReadIndicates whether the text is a hyperlink
HyperlinkAddressstr | NoneReadContains the hyperlink URL or None
FontNamestr | NoneReadStores the name of the font applied to the text
FontSizefloat | NoneReadStores the font size in points
FontColorint | NoneReadHolds the text color as an ARGB integer
Highlightint | NoneRead
Languageint | NoneReadStores the language identifier as an integer
IsBoldboolReadIndicates if the text is rendered in bold
IsItalicboolReadIndicates if the text is rendered in italic
IsUnderlineboolReadIndicates if the text is underlined
IsStrikethroughboolReadIndicates if the text has a strikethrough
IsSuperscriptboolReadIndicates if the text is superscript
IsSubscriptboolReadIndicates if the text is subscript
IsHiddenboolReadIndicates if the text is hidden
IsMathFormattingboolReadIndicates if the text uses math formatting
FontStyleintReadStores numeric flags representing combined font style attributes

Methods

SignatureDescription
__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()TextStyleReturns a TextStyle instance initialized with default formatting
DefaultMsOneNoteTitleTextStyle()TextStyleReturns a TextStyle preset for OneNote title text
DefaultMsOneNoteTitleDateStyle()TextStyleReturns a TextStyle preset for OneNote title date
DefaultMsOneNoteTitleTimeStyle()TextStyleReturns a TextStyle preset for OneNote title time