Skip to content

TextStyle

Unofficial

Text style class.

Import:

import type { TextStyle } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export class TextStyle implements ITextStyle

Implements: ITextStyle

Properties

PropertyTypeDescription
alignTextStyleAlignText alignment.
breakWordsbooleanWhether to break words.
dropShadowbooleanWhether to show a drop shadow.
dropShadowAlphanumberDrop shadow alpha.
dropShadowAnglenumberDrop shadow angle in radians.
dropShadowBlurnumberDrop shadow blur radius.
dropShadowColornumber | stringDrop shadow color.
dropShadowDistancenumberDrop shadow distance.
fillTextStyleFillFill style for the text.
fillGradientStopsnumber[]Fill gradient stops.
fillGradientTypeTEXT_GRADIENTFill gradient type.
fontFamilystring | string[]Font family.
fontSizenumber | stringFont size.
fontStyleTextStyleFontStyleFont style.
fontVariantTextStyleFontVariantFont variant.
fontWeightTextStyleFontWeightFont weight.
leadingnumberLeading between lines.
letterSpacingnumberLetter spacing.
lineHeightnumberLine height.
lineJoinTextStyleLineJoinLine join style.
miterLimitnumberMiter limit.
paddingnumberPadding around the text.
strokenumber | stringStroke color.
strokeThicknessnumberStroke thickness.
styleIDnumberStyle ID for change tracking.
textBaselineTextStyleTextBaselineText baseline.
trimbooleanWhether to trim whitespace.
whiteSpaceTextStyleWhiteSpaceWhite space handling.
wordWrapbooleanWhether to word wrap.
wordWrapWidthnumberWord wrap width.

Methods

MethodReturnsDescription
clone()TextStyleClones this text style.
reset()voidResets the text style to defaults.