new TextStyle( fontFamily, fontSize )

qualifier

Description

Specifies how to style your layered text, controls the font, font size, line spacing and more.
Learn more: Adding text overlays to images
Learn more: Adding text overlays to videos

Parameters
Name Type Description
fontFamily string

The font family

fontSize number | string

The font size

Methods


lineSpacing( spacing )

Parameters
Name Type Description
spacing number

The spacing between multiple lines in pixels.


letterSpacing( spacing )

Parameters
Name Type Description
spacing

The spacing between the letters, in pixels.


fontAntialias( antiAlias )

Description

The antialias setting to apply to the text. When this parameter is not specified, the default antialiasing for the subsystem and target device are applied.

Parameters
Name Type Description
antiAlias FontAntialiasType | string

fontFamily( fontFamilyName )

Description

The name of any universally available font or a custom font, specified as the public ID of a raw, authenticated font in your account. For details on custom fonts, see Using custom fonts for text overlays.

Parameters
Name Type Description
fontFamilyName string

fontSize( fontSize )

Parameters
Name Type Description
fontSize number

The font size


fontWeight( fontWeight )

Parameters
Name Type Description
fontWeight FontWeightType | string

The font weight


fontStyle( fontStyle )

Parameters
Name Type Description
fontStyle string

The font style.


fontHinting( fontHinting )

Parameters
Name Type Description
fontHinting string

The outline hinting style to apply to the text. When this parameter is not specified, the default hint style for the font and target device are applied.


textDecoration( textDecoration )

Parameters
Name Type Description
textDecoration TextDecorationType | string

The font decoration type.


textAlignment( textAlignment )

Parameters
Name Type Description
textAlignment TextAlignmentType | string

The text alignment


stroke()

Description

Whether to include an outline stroke. Set the color and weight of the stroke