TextItem

The text object contained in an art layer.

Methods:

createPath, convertToShape

Objects:

AntiAlias, AutoKernType, Boolean, Case, Direction, Justification, Language, Number, SolidColor, StrikeThruType, String, TextComposer, TextType, UnderlineType, UnitValue, WarpStyle

Property Listing

Property

Type

Access

Description

alternateLigatures

Boolean

read/write

If true, alternate ligatures are used.

antiAliasMethod

AntiAlias

AntiAlias.NONE

AntiAlias.SHARP

AntiAlias.CRISP

AntiAlias.STRONG

AntiAlias.SMOOTH

read/write

The method of anti-aliasing to use.

autoKerning

AutoKernType

AutoKernType.MANUAL

AutoKernType.METRICS

AutoKernType.OPTICAL

read/write

Options for auto kerning.

autoLeadingAmount

Number

read/write

The percentage to use for auto leading. Range: 0.01 to 5000.00.

baselineShift

UnitValue

read/write

The amount of baseline offset of text.

capitalization

Case

Case.NORMAL

Case.ALLCAPS

Case.SMALLCAPS

read/write

The case of the text.

color

SolidColor

read/write

The text color.

contents

String

read/write

The actual text in the layer.

desiredGlyphScaling

Number

read/write

The desired amount (as a percentage) to scale the horizontal size of the text letters. Range: 50 - 200; at 100, the width of characters is not scaled. Valid only for justified text.

desiredLetterScaling

Number

read/write

The amount of space (as a percentage) between letters. Range: 100 - 500; at 0, no space is added between letters. Valid only for justified text.

desiredWordScaling

Number

read/write

The amount (as a percentage) of space between words. Range: 0 -1000; at 100, no additional space is added between words. Valid only for justified text.

direction

Direction

Direction.HORIZONTAL

Direction.VERTICAL

read/write

The text orientation.

fauxBold

Boolean

read/write

If true, faux bold is used.

fauxItalic

Boolean

read/write

If true, faux italic is used.

firstLineIndent

UnitValue

read/write

The amount to indent the first line of paragraphs. Range: -1296 to 1296.

font

String

read/write

The text face of the character.

hangingPuntuation

Boolean

read/write

If true, uses Roman hanging punctuation.

height

UnitValue

read/write

The height of the bounding box for paragraph text.

horizontalScale

Int

read/write

Character scaling (horizontal) in proportion to horizontal scale. Range: 0 - 1000 as a percentage.

hyphenLimit

Int

read/write

The maximum number of consecutive lines that can end with a hyphenated word.

hyphenateAfterFirst

Int (range 1 - 15)

read/write

The number of letters after which hyphenation in word wrap is allowed. Range: 1 to 15.

hyphenateBeforeLast

Int (range 1 - 15)

read/write

The number of letters before which hyphenation in word wrap is allowed. Range: 1 to 15.

hyphenateCapitalWords

Boolean

read/write

If true, capitalized words can be hyphenated.

hyphenateWordsLongerThan

Int (range 0 2 - 25)

read/write

The minimum number of letters a word must have in order for hyphenation in word wrap to be allowed. Range: 2 to 25.

hyphenation

Boolean

read/write

If true, hyphenation is used.

hyphenationZone

UnitValue

read/write

The distance at the end of a line that will cause a word to break in unjustified type. Range: 0 - 720 picas.

justification

Justification

Justification.LEFT

Justification.CENTER

Justification.RIGHT

Justification.LEFTJUSTIFIED

Justification.CENTERJUSTIFIED

Justification.RIGHTJUSTIFIED

Justification.FULLYJUSTIFIED

read/write

The paragraph justification.

kind

TextType

TextType.POINTTEXT

TextType.PARAGRAPHTEXT

read/write

The type of text.

language

Language

Language.ENGLISHUSA

Language.ENGLISHUK

Language.FRENCH

Language.CANADIANFRENCH

Language.FINNISH

Language.GERMAN

Language.OLDGERMAN

Language.SWISSGERMAN

Language.ITALIAN

Language.NORWEGIAN

Language.NYNORSKNORWEGIAN

Language.PORTUGUESE

Language.BRAZILLIANPORTUGUESE

Language.SPANISH

Language.SWEDISH

Language.DUTCH

Language.DANISH

read/write

The language.

leading

UnitValue

read/write

The leading amount.

leftIndent

UnitValue

read/write

The amount to indent text from the left. Range: -1296 to 1296.

ligatures

Boolean

read/write

If true, ligatures are used.

maximumGlyphScaling

Number

read/write

The maximum amount (as a percentage) to scale the horizontal size of the text letters. Range: 50 - 200; at 100, the width of characters is not scaled. Valid only for justified text.

maximumLetterScaling

Number

read/write

The maximum amount (as a percentage) of space between letters. Range: 100 - 500; at 0, no space is added between letters. Valid only for justified text.

maximumWordScaling

Number

read/write

The maximum amount (as a percentage) of space between words (0 -1000; at 100, no additional space is added between words). Valid only for justified text.

minimumGlyphScaling

Number

read/write

The minimum amount (as a percentage) to scale the horizontal size of the text letters. Range: 50 - 200; at 100, the width of characters is not scaled. Valid only for justified text.

minimumLetterScaling

Number (range 100 - 500)

read/write

The minimum amount of space (as a percentage) between letters. Range: 100 to 500; at 0, no space is added between letters. Valid only for justified text.

minimumWordScaling

Number

read/write

The minimum amount (as a percentage) of space between words. Range: 0 -1000; at 100, no additional space is added between words. Valid only for justified text.

noBreak

Boolean

read/write

If true, words are not allowed to break at the end of a line. When enacted on large amounts of consecutive characters, can prevent word wrap and thus may prevent some text from appearing on the screen.

oldStyle

Boolean

read/write

If true, old style is used.

parent

 

readonly

The object's container.

position

UnitPoint

read/write

The position of the origin for the text. The array must contain two values. Setting this property is basically equivalent to clicking the text tool at a point in the document to create the point of origin for text.

rightIndent

UnitValue

read/write

The amount to indent text from the right. Range: -1296 to 1296.

size

UnitValue

read/write

The font size in points.

spaceAfter

UnitValue

read/write

The amount of space after each paragraph. Range: -1296 to 1296.

spaceBefore

UnitValue

read/write

The amount of space before each paragraph. Range: -1296 to 1296.

strikeThru

StrikeThruType

StrikeThruType.STRIKEOFF

StrikeThruType.STRIKEHEIGHT

StrikeThruType.STRIKEBOX

read/write

The strike through option to use.

textComposer

TextComposer

TextComposer.ADOBESINGLELINE

TextComposer.ADOBEEVERYLINE

read/write

The text composing engine to use.

tracking

Number

read/write

The amount of uniform spacing between multiple characters. Range: -1000 to 10000.

typename

String

readonly

The class name of the object.

underline

UnderlineType

UnderlineType.UNDERLINEOFF

UnderlineType.UNDERLINERIGHT

UnderlineType.UNDERLINELEFT

read/write

Options for underlining the text.

useAutoLeading

Boolean

read/write

If true, uses the font's built-in leading information.

verticalScale

Int

read/write

Character scaling (vertical) in proportion to horizontal scale. Range: 0 - 1000 as a percentage.

warpBend

Number

read/write

The warp bend percentage. Range: -100 to 100.

warpDirection

Direction

Direction.HORIZONTAL

Direction.VERTICAL

read/write

The warp direction.

warpHorizontalDistortion

Number

read/write

The warp horizontal distortion percentage. Range: -100 to 100.

warpStyle

WarpStyle

WarpStyle.NONE

WarpStyle.ARC

WarpStyle.ARCLOWER

WarpStyle.ARCUPPER

WarpStyle.ARCH

WarpStyle.BULGE

WarpStyle.SHELLLOWER

WarpStyle.SHELLUPPER

WarpStyle.FLAG

WarpStyle.WAVE

WarpStyle.FISH

WarpStyle.RISE

WarpStyle.FISHEYE

WarpStyle.INFLATE

WarpStyle.SQUEEZE

WarpStyle.TWIST

read/write

The style of warp.

warpVerticalDistortion

Number

read/write

The warp vertical distortion percentage. Range: -100 to 100.

width

UnitValue

read/write

The width of the bounding box for paragraph text.

Method Listing

undefined convertToShape ()

Converts the text object and its containing layer to a fill layer with the text changed to a clipping path.

undefined createPath ()

Creates a clipping path from the outlines of the actual text items (such as letters or words).

Object of

ArtLayer.textItem