Skip to content

ITextStyle

Unofficial

Text style interface.

Import:

import type { ITextStyle } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface 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.
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.