TextStyleSettings Class @beta
A description of the formatting to be applied to a TextBlockComponent. Named instances of these settings can be stored as AnnotationTextStyles in an iModel.
@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 | ||
| frameEquals(other: TextFrameStyleProps): boolean | ||
| getValidationErrors(): string[] | Returns a list of validation errors for this instance. | |
| leaderEquals(other: TextLeaderStyleProps): boolean | Compare two TextLeaderStyleProps for equality. | |
| marginsEqual(other: TextBlockMargins): 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 | { color: TextStyleColor, font: { name: string, type: FontType }, frame: { borderColor: TextStyleColor, borderWeight: number, fillColor: TextAnnotationFillColor, shape: "none" | "line" | "rectangle" | "circle" | "equilateralTriangle" | "diamond" | "square" | "pentagon" | "hexagon" | "octagon" | "capsule" | "roundedRectangle" }, indentation: number, isBold: boolean, isItalic: boolean, isUnderlined: boolean, justification: TextJustification, leader: { color: TextStyleColor | "inherit", elbowLength: number, terminatorHeightFactor: number, terminatorWidthFactor: number, wantElbow: boolean }, lineSpacingFactor: number, listMarker: { case: "upper" | "lower", enumerator: string, terminator: "parenthesis" | "period" }, margins: { bottom: number, left: number, right: number, top: number }, paragraphSpacingFactor: number, stackedFractionScale: number, stackedFractionType: StackedFractionType, subScriptOffsetFactor: number, subScriptScale: number, superScriptOffsetFactor: number, superScriptScale: number, tabInterval: number, textHeight: number, widthFactor: number } | A fully-populated JSON representation of the default settings. | |
| defaults Static | TextStyleSettings | Settings initialized to all default values. | |
| font Readonly | Readonly<Required<FontFamilySelector>> | The font stored in an iModel, used to draw the contents of a TextRun. | |
| frame Readonly | Readonly<Required<TextFrameStyleProps>> | The frame settings of the TextAnnotation. | |
| indentation Readonly | number | The offset (in meters) from the left edge of the text block to the start of the line of text. | |
| 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. | |
| justification Readonly | TextJustification | The alignment of the text content. | |
| leader Readonly | Readonly<Required<TextLeaderStyleProps>> | Properties describing appearance of leaders in a TextAnnotation. | |
| lineSpacingFactor Readonly | number | Multiplier used to compute the vertical distance between two lines of text. | |
| listMarker Readonly | ListMarker | The marker used to indicate the start of a list item. | |
| margins Readonly | Readonly<Required<TextBlockMargins>> | The margins to surround the document content. | |
| paragraphSpacingFactor Readonly | number | Multiplier used to compute the vertical distance between two paragraphs 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. | |
| tabInterval Readonly | number | The size (in meters) used to calculate the tab stops in a run. | |
| textHeight Readonly | number | The height of the text, in meters. | |
| widthFactor Readonly | number | Multiplier used to compute the width of each glyph, relative to textHeight. |
Defined in
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.