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. | |
toJSON(): TextStyleSettingsProps | ||
cloneProps(props: TextStyleSettingsProps): TextStyleSettingsProps Static | Creates a deep copy of the 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, fontName: string, frame: { border: TextStyleColor, borderWeight: number, fill: TextAnnotationFillColor, shape: "none" | "line" | "rectangle" | "circle" | "equilateralTriangle" | "diamond" | "square" | "pentagon" | "hexagon" | "octagon" | "capsule" | "roundedRectangle" }, isBold: boolean, isItalic: boolean, isUnderlined: boolean, leader: { color: TextStyleColor | "inherit", elbowLength: number, terminatorHeightFactor: number, terminatorWidthFactor: number, wantElbow: boolean }, lineHeight: number, lineSpacingFactor: number, stackedFractionScale: number, stackedFractionType: StackedFractionType, subScriptOffsetFactor: number, subScriptScale: number, superScriptOffsetFactor: number, superScriptScale: number, tabInterval: number, widthFactor: number } | 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 an iModel, used to draw the contents of a TextRun. | |
frame Readonly | Readonly<Required<TextFrameStyleProps>> | The frame settings of the TextAnnotation. | |
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. | |
leader Readonly | Readonly<Required<TextLeaderStyleProps>> | Properties describing appearance of leaders in a TextAnnotation. | |
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. | |
tabInterval Readonly | number | The size (in meters) used to calculate the tab stops in a run. | |
widthFactor Readonly | number | Multiplier used to compute the width of each glyph, relative to lineHeight. |
Defined in
Last Updated: 29 July, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.