TextStyle
Unofficial
Text style class.
Import:
import type { TextStyle } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export class TextStyle implements ITextStyleImplements: ITextStyle
Properties
| Property | Type | Description | |
|---|---|---|---|
| align | TextStyleAlign | Text alignment. | |
| breakWords | boolean | Whether to break words. | |
| dropShadow | boolean | Whether to show a drop shadow. | |
| dropShadowAlpha | number | Drop shadow alpha. | |
| dropShadowAngle | number | Drop shadow angle in radians. | |
| dropShadowBlur | number | Drop shadow blur radius. | |
| dropShadowColor | number | string | Drop shadow color. | |
| dropShadowDistance | number | Drop shadow distance. | |
| fill | TextStyleFill | Fill style for the text. | |
| fillGradientStops | number[] | Fill gradient stops. | |
| fillGradientType | TEXT_GRADIENT | Fill gradient type. | |
| fontFamily | string | string[] | Font family. | |
| fontSize | number | string | Font size. | |
| fontStyle | TextStyleFontStyle | Font style. | |
| fontVariant | TextStyleFontVariant | Font variant. | |
| fontWeight | TextStyleFontWeight | Font weight. | |
| leading | number | Leading between lines. | |
| letterSpacing | number | Letter spacing. | |
| lineHeight | number | Line height. | |
| lineJoin | TextStyleLineJoin | Line join style. | |
| miterLimit | number | Miter limit. | |
| padding | number | Padding around the text. | |
| stroke | number | string | Stroke color. | |
| strokeThickness | number | Stroke thickness. | |
| styleID | number | Style ID for change tracking. | |
| textBaseline | TextStyleTextBaseline | Text baseline. | |
| trim | boolean | Whether to trim whitespace. | |
| whiteSpace | TextStyleWhiteSpace | White space handling. | |
| wordWrap | boolean | Whether to word wrap. | |
| wordWrapWidth | number | Word wrap width. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| clone() | TextStyle | Clones this text style. | |
| reset() | void | Resets the text style to defaults. |