Skip to content
Menu
Auto
English

TextStyle

Defined in: index.ts:221

TextStyle for text watermark

textStyle: {
color: '#aacc22',
fontName: 'Arial',
fontSize: 12,
shadowStyle: {
dx: 10,
dy: 10,
radius: 10,
color: '#aacc22'
},
textBackgroundStyle: {
paddingX: 10,
paddingY: 10,
type: TextBackgroundType.stretchX,
color: '#aacc22'
},
underline: true,
skewX: -0.25,
strikeThrough: true,
textAlign: 'left',
italic: true,
bold: true,
rotate: 45
}

optional bold?: boolean

Defined in: index.ts:309

text bold

false
bold: true

optional color?: string

Defined in: index.ts:228

font color

'#000000'
color: '#aacc22'

optional fontName?: string

Defined in: index.ts:234

font name

fontName: 'Arial'

optional fontSize?: number

Defined in: index.ts:240

font size used when rendering text onto the output image

fontSize: 12

optional fontSizeRatio?: number

Defined in: index.ts:246

font size ratio relative to the background image width

fontSizeRatio: 0.03

optional italic?: boolean

Defined in: index.ts:302

text italic

false
italic: true

optional rotate?: number

Defined in: index.ts:316

rotate text

0
rotate: 45

optional shadowStyle?: ShadowLayerStyle | null

Defined in: index.ts:257

text shadow style

shadowStyle: {
dx: 10,
dy: 10,
radius: 10,
color: '#aacc22'
}

optional skewX?: number

Defined in: index.ts:281

Horizontal text shear factor. Use italic for font-provided italics.

skewX: -0.25

optional strikeThrough?: boolean

Defined in: index.ts:288

text strikethrough

false
strikeThrough: true

optional textAlign?: "center" | "left" | "right"

Defined in: index.ts:295

text align

'left'
textAlign: 'left'

optional textBackgroundStyle?: TextBackgroundStyle | null

Defined in: index.ts:268

text background style

textBackgroundStyle: {
paddingX: 10,
paddingY: 10,
type: TextBackgroundType.stretchX,
color: '#aacc22'
}

optional underline?: boolean

Defined in: index.ts:275

text underline style

false
underline: true