Skip to content

Latest commit

 

History

History
585 lines (325 loc) · 8.97 KB

text-style.rst

File metadata and controls

585 lines (325 loc) · 8.97 KB

Text Style

These functions are accessible from SourceText.style after AE 17.0.

For more info on working with text styles, see:


TextStyle.setText(value)

Description

This is used when you want to define (or inherit) a text style, while setting the text content separately.

For example, to inherit the text style and content from another layer:

const referenceText = thisComp.layer("source layer name").text.sourceText;

const style = referenceText.getStyleAt(0,0);
style.setText(referenceText);

Or to create a custom style and then set the text within the expression:

text.sourceText.createStyle().setFontSize(300).setFont("Impact").setText("Hello world!")

Parameters

value String. The text to set

Type

None


yle.fontSize:

TextStyle. fontSize


**Descript

ion**

Returns th

Type

Number


e value of Font Size for a text layer.

yle.setFontSize:

TextStyle. setFontSize(value)


**Descript

ion**

Used to se

t the font size to a specified value.

**Paramete

rs**

========= ================================
value Number. The font size to set to.

Type

None


TextStyle.font

Description

Returns the font name for a text layer.

Type

String


TextStyle.setFont(value)

Description

Used to set the font to a specified value.

Parameters

value String. The font to set to.

Type

None


yle.isFauxBold:

TextStyle. isFauxBold


**Descript

ion**

Returns wh

Type

Boolean


ether faux bold is enabled

yle.setFauxBold:

TextStyle. setFauxBold(value)


**Descript

ion**

Used to se

t the faux bold status

**Paramete

rs**

========= ===============================================
value Boolean. Whether to enable or disable faux bold

Type

None


TextStyle.isFauxItalic

Description

Returns whether faux italic is enabled

Type

Boolean


TextStyle.setFauxItalic(value)

Description

Used to set the faux italic status

Parameters

value Boolean. Whether to enable or disable faux italic

Type

None


yle.isAllCaps:

TextStyle. isAllCaps


**Descript

ion**

Returns wh

Type

Boolean


ether all caps is enabled

yle.setAllCaps:

TextStyle. setAllCaps(value)


**Descript

ion**

Used to se

t the All Caps status

**Paramete

rs**

========= ==============================================
value Boolean. Whether to enable or disable all caps

Type

None


TextStyle.isSmallCaps

Description

Returns whether small caps is enabled

Type

Boolean


TextStyle.setSmallCaps(value)

Description

Used to set the small caps status

Parameters

value Boolean. Whether to enable or disable small caps

Type

None


yle.tracking:

TextStyle. tracking


**Descript

ion**

Returns th

Type

Number


e value of Tracking for a text layer.

yle.setTracking:

TextStyle. setTracking(value)


**Descript

ion**

Used to se

t the tracking to a specified value.

**Paramete

rs**

========= =====================================
value Number. The tracking value to set to.

Type

None


TextStyle.leading

Description

Returns the value of leading for a text layer.

Type

Number


TextStyle.setLeading(value)

Description

Used to set the leading to a specified value.

Parameters

value Number. The leading value to set to.

Type

None


yle.isAutoLeading:

TextStyle. isAutoLeading


**Descript

ion**

Returns wh

Type

Boolean


ether auto leading is enabled

yle.setAutoLeading:

TextStyle. setAutoLeading(value)


**Descript

ion**

Used to se

t the auto leading status

**Paramete

rs**

========= ==================================================
value Boolean. Whether to enable or disable auto leading

Type

None


TextStyle.baselineShift

Description

Returns the value of baseline shift for a text layer.

Type

Number


TextStyle.setBaselineShift(value)

Description

Used to set the baseline shift to a specified value.

Parameters

value Number. The baseline shift value to set to.

Type

None


yle.applyFill:

TextStyle. applyFill


**Descript

ion**

Returns wh

Type

Boolean


ether text fill color is enabled

yle.setApplyFill:

TextStyle. setApplyFill(value)


**Descript

ion**

Used to se

t whether text fill is enabled

**Paramete

rs**

========= ================================================
value Boolean. Whether to enable or disable apply fill

Type

None


TextStyle.fillColor

Description

Returns the text fill color, RGB values on a scale from 0 - 1.0

Type

Array of numbers


TextStyle.setFillColor(value)

Description

Used to set the text fill color

Parameters

value Array of numbers. [R, G, B] with each value between 0.0 to 1.0

Type

None


yle.applyStroke:

TextStyle. applyStroke


**Descript

ion**

Returns wh

Type

Boolean


ether text stroke is enabled

yle.setApplyStroke:

TextStyle. setApplyStroke(value)


**Descript

ion**

Used to se

t whether text stroke is enabled

**Paramete

rs**

========= =================================================
value Boolean. Whether to enable or disable text stroke

Type

None


TextStyle.strokeColor

Description

Returns the text stroke color, RGB values on a scale from 0 - 1.0

Type

Array of numbers


TextStyle.setStrokeColor(value)

Description

Used to set the text stroke color

Parameters

value Array of numbers. [R, G, B] with each value between 0.0 to 1.0

Type

None


yle.strokeWidth:

TextStyle. strokeWidth


**Descript

ion**

Returns th

Type

Number


e stroke width value for a text layer.

yle.setStrokeWidth:

TextStyle. setStrokeWidth(value)


**Descript

ion**

Used to se

t the stroke width to a specified value.

**Paramete

rs**

========= =============================================
value Number. The value to set the stroke width to.

Type

None