TextStyleSettings Class @beta
A description of the formatting to be applied to a TextBlockComponent. Named instances of these settings can be stored as TextStyles in a Workspace.
@note This is an immutable type. Use clone to create a modified copy.
@see TextStyleSettingsProps for documentation of each of the settings.
Methods
| Name | Description | |
|---|---|---|
| clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings | Create a copy of these settings, modified according to the properties defined by alteredProps. | |
| equals(other: TextStyleSettings): boolean | ||
| toJSON(): TextStyleSettingsProps | ||
| fromJSON(props?: TextStyleSettingsProps): TextStyleSettings Static | Create settings from their JSON representation. | 
Properties
| Name | Type | Description | |
|---|---|---|---|
| color Readonly | TextStyleColor | The color of the text. | |
| defaultProps Static | Readonly<Required<TextStyleSettingsProps>> | A fully-populated JSON representation of the default settings. | |
| defaults Static | TextStyleSettings | Settings initialized to all default values. | |
| fontName Readonly | string | The name of a font stored in a Workspace, used to draw the contents of a TextRun. | |
| isBold Readonly | boolean | Specifies whether the content of a TextRun should be rendered bold. | |
| isItalic Readonly | boolean | Specifies whether the content of a TextRun should be rendered in italics. | |
| isUnderlined Readonly | boolean | Specifies whether the content of a TextRun should be underlined. | |
| lineHeight Readonly | number | The height each line of text, in meters. | |
| lineSpacingFactor Readonly | number | Multiplier used to compute the vertical distance between two lines of text. | |
| stackedFractionScale Readonly | number | Multiplier used to compute the height of both the numerator and denominator of a FractionRun. | |
| stackedFractionType Readonly | StackedFractionType | Specifies how to separate the numerator and denominator of a FractionRun. | |
| subScriptOffsetFactor Readonly | number | Multiplier used to compute the vertical offset from the baseline for a subscript TextRun. | |
| subScriptScale Readonly | number | Multiplier used to compute the height of a subscript TextRun. | |
| superScriptOffsetFactor Readonly | number | Multiplier used to compute the vertical offset from the baseline for a super TextRun. | |
| superScriptScale Readonly | number | Multiplier used to compute the height of a superscript TextRun. | |
| widthFactor Readonly | number | Multiplier used to compute the width of each glyph, relative to lineHeight. | 
Defined in
Last Updated: 24 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.