Adobe Photoshop CS5 Object Library JS: TextItem

Photoshop CS5

Class

TextItem

 The text object contained in an art layer.

QuickLinks

convertToShape, createPath

Hierarchy

Object
TextItem

Properties

PropertyTypeAccessDescription
alternateLigaturesbool r/wIf true, alternate ligatures are used.
antiAliasMethodAntiAlias:
AntiAlias.NONE
AntiAlias.SHARP
AntiAlias.CRISP
AntiAlias.STRONG
AntiAlias.SMOOTH
r/wThe method of anti-aliasing to use.
autoKerningAutoKernType:
AutoKernType.MANUAL
AutoKernType.METRICS
AutoKernType.OPTICAL
r/wOptions for auto kerning.
autoLeadingAmountnumber r/wThe percentage to use for auto leading. Range: 0.01 to 5000.00.
baselineShiftUnitValue r/wThe amount of baseline offset of text.
capitalizationCase:
Case.NORMAL
Case.ALLCAPS
Case.SMALLCAPS
r/wThe case of the text.
colorSolidColor r/wThe text color.
contentsstring r/wThe actual text in the layer.
desiredGlyphScalingnumber r/wThe 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.
desiredLetterScalingnumber r/wThe amount of space (as a percentage) between letters. Range: 100 - 500; at 0, no space is added between letters. Valid only for justified text.
desiredWordScalingnumber r/wThe 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.
directionDirection:
Direction.HORIZONTAL
Direction.VERTICAL
r/wThe text orientation.
fauxBoldbool r/wIf true, faux bold is used.
fauxItalicbool r/wIf true, faux italic is used.
firstLineIndentUnitValue r/wThe amount to indent the first line of paragraphs. Range: -1296 to 1296.
fontstring r/wThe text face of the character.
hangingPuntuationbool r/wIf true, uses Roman hanging punctuation.
heightUnitValue r/wThe height of the bounding box for paragraph text.
horizontalScaleint r/wCharacter scaling (horizontal) in proportion to horizontal scale. Range: 0 - 1000 as a percentage.
hyphenLimitint r/wThe maximum number of consecutive lines that can end with a hyphenated word.
hyphenateAfterFirstint r/wThe number of letters after which hyphenation in word wrap is allowed. Range: 1 to 15.
hyphenateBeforeLastint r/wThe number of letters before which hyphenation in word wrap is allowed. Range: 1 to 15.
hyphenateCapitalWordsbool r/wIf true, capitalized words can be hyphenated.
hyphenateWordsLongerThanint (min: 0) r/wThe minimum number of letters a word must have in order for hyphenation in word wrap to be allowed. Range: 2 to 25.
hyphenationbool r/wIf true, hyphenation is used.
hyphenationZoneUnitValue r/wThe distance at the end of a line that will cause a word to break in unjustified type. Range: 0 - 720 picas.
justificationJustification:
Justification.LEFT
Justification.CENTER
Justification.RIGHT
Justification.LEFTJUSTIFIED
Justification.CENTERJUSTIFIED
Justification.RIGHTJUSTIFIED
Justification.FULLYJUSTIFIED
r/wThe paragraph justification.
kindTextType:
TextType.POINTTEXT
TextType.PARAGRAPHTEXT
r/wThe type of text.
languageLanguage:
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
r/wThe language.
leadingUnitValue r/wThe leading amount.
leftIndentUnitValue r/wThe amount to indent text from the left. Range: -1296 to 1296.
ligaturesbool r/wIf true, ligatures are used.
maximumGlyphScalingnumber r/wThe 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.
maximumLetterScalingnumber r/wThe 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.
maximumWordScalingnumber r/wThe 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.
minimumGlyphScalingnumber r/wThe 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.
minimumLetterScalingnumber r/wThe 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.
minimumWordScalingnumber r/wThe 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.
noBreakbool r/wIf 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.
oldStylebool r/wIf true, old style is used.
parentObject readonlyThe object's container.
positionUnitPoint r/wThe 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.
rightIndentUnitValue r/wThe amount to indent text from the right. Range: -1296 to 1296.
sizeUnitValue r/wThe font size.
spaceAfterUnitValue r/wThe amount of space after each paragraph. Range: -1296 to 1296.
spaceBeforeUnitValue r/wThe amount of space before each paragraph. Range: -1296 to 1296.
strikeThruStrikeThruType:
StrikeThruType.STRIKEOFF
StrikeThruType.STRIKEHEIGHT
StrikeThruType.STRIKEBOX
r/wThe strike through option to use.
textComposerTextComposer:
TextComposer.ADOBESINGLELINE
TextComposer.ADOBEEVERYLINE
r/wThe text composing engine to use.
trackingnumber r/wThe amount of uniform spacing between multiple characters. Range: -1000 to 10000.
typenamestring readonlyThe class name of the object.
underlineUnderlineType:
UnderlineType.UNDERLINEOFF
UnderlineType.UNDERLINERIGHT
UnderlineType.UNDERLINELEFT
r/wOptions for underlining the text.
useAutoLeadingbool r/wIf true, uses the font's built-in leading information.
verticalScaleint r/wCharacter scaling (vertical) in proportion to horizontal scale. Range: 0 - 1000 as a percentage.
warpBendnumber r/wThe warp bend percentage. Range: -100 to 100.
warpDirectionDirection:
Direction.HORIZONTAL
Direction.VERTICAL
r/wThe warp direction.
warpHorizontalDistortionnumber r/wThe warp horizontal distortion percentage. Range: -100 to 100.
warpStyleWarpStyle:
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
r/wThe style of warp.
warpVerticalDistortionnumber r/wThe warp vertical distortion percentage. Range: -100 to 100.
widthUnitValue r/wThe width of the bounding box for paragraph text.

Methods

Instances

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

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

Element of

ArtLayer.textItem

Jongware, 28-Aug-2012 v3.0.3iContents :: Index