Layer Text Object Simplified Format

Used by the following utility script:

Simplified format

Defined as a JSON object:

    "layerText": layerText,
    "typeUnit": typeUnit

layerText : JSON object in Layer text format
typeUnit : string (among Type units)

Layer text

    "textKey": textKey,
    "warp": warp,
    "textClickPoint": textClickPoint,
    "transform": transform,
    "textGridding": textGridding,
    "orientation": orientation,
    "antiAlias": antiAlias,
    "textShape": textShape,
    "textStyleRange": textStyleRange,
    "paragraphStyleRange": paragraphStyleRange,
    "kerningRange": kerningRange

textKey : string
warp : JSON object in Warp format
textClickPoint : JSON object in Point format (in percentage)
transform : [optional] JSON object in Transform format
textGridding : string (among "none", "round")
orientation : string (among "horizontal", "vertical")
antiAlias : string (among "antiAliasNone", "antiAliasSharp", "antiAliasCrisp", "antiAliasStrong", "antiAliasSmooth")
textShape : JSON array of text shapes, each one being a JSON object in Text shape format
textStyleRange : JSON array of text style ranges, each one being a JSON object in Text style range format
paragraphStyleRange : JSON array of paragraph style ranges, each one being a JSON object in Paragraph style range format
kerningRange : JSON array of kerning ranges, each one being a JSON object in Kerning range format

Text shape

    "path": path,
    "tRange": tRange,
    "textType": textType,
    "orientation": orientation,
    "transform": transform,
    "rowCount": rowCount,
    "columnCount": columnCount,
    "rowMajorOrder": rowMajorOrder,
    "rowGutter": rowGutter,
    "columnGutter": columnGutter,
    "spacing": spacing,
    "frameBaselineAlignment": frameBaselineAlignment,
    "firstBaselineMinimum": firstBaselineMinimum,
    "base": base,
    "bounds": bounds,
    "flip": flip,
    "pathTypeEffect": pathTypeEffect,
    "pathTypeAlignment": pathTypeAlignment,
    "pathTypeAlignTo": pathTypeAlignTo,
    "pathTypeSpacing": pathTypeSpacing

path : [optional] JSON object in Path format
tRange : [optional; only if textType is "onACurve"] JSON object in T-range format
textType : string (among "point", "box", "onACurve")
orientation : string (among "horizontal", "vertical")
transform : JSON object in Transform format
rowCount : number
columnCount : number
rowMajorOrder : boolean
rowGutter : number
columnGutter : number
spacing : number
frameBaselineAlignment : string (among "alignByAscent", "alignByMinimumValue", "alignByCapHeight", "alignByLeading", "alignByXHeight")
firstBaselineMinimum : number
base : [optional; only if textType is "point"] JSON object in Point format
bounds : [optional; only if textType is "box"] JSON object in Rectangle format
flip : [optional; only if textType is "onACurve"] boolean
pathTypeEffect : [optional; only if textType is "onACurve"] string (among "rainbowEffect", "skewEffect", "3DRibbonEffect", "stairStepEffect", "gravityEffect")
pathTypeAlignment : [optional; only if textType is "onACurve"] string (among "baselineAlignment", "ascenderAlignment", "descenderAlignment", "centerAlignment")
pathTypeAlignTo : [optional; only if textType is "onACurve"] string (among "toPathTop", "toPathBottom", "toPathCenter")
pathTypeSpacing : [optional; only if textType is "onACurve"] number

Text style range

    "from": from,
    "to": to,
    "textStyle": textStyle

from : number
to : number
textStyle : JSON object in Text style format

Text style

    "fontPostScriptName": fontPostScriptName,
    "fontName": fontName,
    "fontStyleName": fontStyleName,
    "fontScript": fontScript,
    "fontTechnology": fontTechnology,
    "size": size,
    "horizontalScale": horizontalScale,
    "verticalScale": verticalScale,
    "syntheticBold": syntheticBold,
    "syntheticItalic": syntheticItalic,
    "autoLeading": autoLeading,
    "leading": leading,
    "tracking": tracking,
    "baselineShift": baselineShift,
    "characterRotation": characterRotation,
    "autoKern": autoKern,
    "fontCaps": fontCaps,
    "baseline": baseline,
    "otbaseline": otbaseline,
    "strikethrough": strikethrough,
    "underline": underline,
    "underlineOffset": underlineOffset,
    "ligature": ligature,
    "altligature": altligature,
    "contextualLigatures": contextualLigatures,
    "alternateLigatures": alternateLigatures,
    "oldStyle": oldStyle,
    "fractions": fractions,
    "ordinals": ordinals,
    "swash": swash,
    "titling": titling,
    "connectionForms": connectionForms,
    "stylisticAlternates": stylisticAlternates,
    "ornaments": ornaments,
    "figureStyle": figureStyle,
    "proportionalMetrics": proportionalMetrics,
    "kana": kana,
    "italics": italics,
    "ruby": ruby,
    "baselineDirection": baselineDirection,
    "textLanguage": textLanguage,
    "japaneseAlternate": japaneseAlternate,
    "mojiZume": mojiZume,
    "gridAlignment": gridAlignment,
    "enableWariChu": enableWariChu,
    "wariChuCount": wariChuCount,
    "wariChuLineGap": wariChuLineGap,
    "wariChuScale": wariChuScale,
    "wariChuWidow": wariChuWidow,
    "wariChuOrphan": wariChuOrphan,
    "wariChuJustification": wariChuJustification,
    "tcyUpDown": tcyUpDown,
    "tcyLeftRight": tcyLeftRight,
    "leftAki": leftAki,
    "rightAki": rightAki,
    "jiDori": jiDori,
    "noBreak": noBreak,
    "color": color,
    "strokeColor": strokeColor,
    "fill": fill,
    "stroke": stroke,
    "fillFirst": fillFirst,
    "fillOverPrint": fillOverPrint,
    "strokeOverPrint": strokeOverPrint,
    "lineCap": lineCap,
    "lineJoin": lineJoin,
    "lineWidth": lineWidth,
    "miterLimit": miterLimit,
    "lineDashoffset": lineDashoffset

fontPostScriptName : string
fontName : string
fontStyleName : string
fontScript : number
fontTechnology : number
size : number
horizontalScale : number
verticalScale : number
syntheticBold : boolean
syntheticItalic : boolean
autoLeading : boolean
leading : [optional; only if autoLeading is false] number
tracking : number
baselineShift : number
characterRotation : number
autoKern : string (among "metricsKern", "opticalKern", "manual")
fontCaps : string (among "normal", "allCaps", "smallCaps")
baseline : string (among "normal", "superScript", "subScript")
otbaseline : string (among "normal", …)
strikethrough : string (among "strikethroughOff", "xHeightStrikethroughOn", "eMBoxStrikethroughOn")
underline : string (among "underlineOff", "underlineOnLeftInVertical", "underlineOnRightInVertical", "verticalUnderlineLeft", "verticalUnderlineRight")
underlineOffset : number
ligature : boolean
altligature : boolean
contextualLigatures : boolean
alternateLigatures : boolean
oldStyle : boolean
fractions : boolean
ordinals : boolean
swash : boolean
titling : boolean
connectionForms : boolean
stylisticAlternates : boolean
ornaments : boolean
figureStyle : string (among "normal", …)
proportionalMetrics : boolean
kana : boolean
italics : boolean
ruby : boolean
baselineDirection : string (among "rotated", "cross", …)
textLanguage : string (among "englishLanguage", "ukenglishLanguage", "canadianEnglishLanguage", "finnishLanguage", "standardFrenchLanguage", "canadianFrenchLanguage", "standardGermanLanguage", "germanLanguageReformed1996", "oldGermanLanguage", "swissGermanLanguage", "swissGermanLanguageOldRules", "italianLanguage", "bokmalNorwegianLanguage", "nynorskNorwegianLanguage", "standardPortugueseLanguage", "brazilianPortugueseLanguage", "spanishLanguage", "swedishLanguage", "dutchLanguage", "oldDutchLanguage", "danishLanguage", "catalanLanguage", "russianLanguage", "ukrainianLanguage", "bulgarianLanguage", "serbianLanguage", "czechLanguage", "polishLanguage", "romanianLanguage", "ukranianLanguage", "greekLanguage", "turkishLanguage", "icelandicLanguage", "hungarianLanguage", "slovakLanguage", "slovenianLanguage", "croatianLanguage", "latvianLanguage", "lithuanianLanguage", "estonianLanguage", "chineseLanguage", "japaneseLanguage")
japaneseAlternate : string (among "defaultForm", "JIS78Form", "expertForm", "traditionalForm")
mojiZume : number
gridAlignment : string (among "roman", "icfbottom", "icftop")
enableWariChu : boolean
wariChuCount : number
wariChuLineGap : number
wariChuScale : number
wariChuWidow : number
wariChuOrphan : number
wariChuJustification : string (among "wariChuLeftJustify", "wariChuRightJustify", "wariChuCenterJustify", "wariChuFullJustifyLastLineLeft", "wariChuFullJustifyLastLineRight", "wariChuFullJustifyLastLineCenter", "wariChuFullJustifyLastLineFull", "wariChuAutoJustify")
tcyUpDown : number
tcyLeftRight : number
leftAki : number
rightAki : number
jiDori : number
noBreak : boolean
color : JSON object in Color format
strokeColor : JSON object in Color format
fill : boolean
stroke : boolean
fillFirst : boolean
fillOverPrint : boolean
strokeOverPrint : boolean
lineCap : string (among "buttCap", "roundCap", "squareCap")
lineJoin : string (among "miterJoin", "roundJoin", "bevelJoin")
lineWidth : number
miterLimit : number
lineDashoffset : number

Paragraph style range

    "from": from,
    "to": to,
    "paragraphStyle": paragraphStyle

from : number
to : number
paragraphStyle : JSON object in Paragraph style format

Paragraph style

    "alignment": alignment,
    "firstLineIndent": firstLineIndent,
    "startIndent": startIndent,
    "endIndent": endIndent,
    "spaceBefore": spaceBefore,
    "spaceAfter": spaceAfter,
    "dropCapMultiplier": dropCapMultiplier,
    "autoLeadingPercentage": autoLeadingPercentage,
    "leadingType": leadingType,
    "hyphenate": hyphenate,
    "hyphenateWordSize": hyphenateWordSize,
    "hyphenatePreLength": hyphenatePreLength,
    "hyphenatePostLength": hyphenatePostLength,
    "hyphenateLimit": hyphenateLimit,
    "hyphenationZone": hyphenationZone,
    "hyphenateCapitalized": hyphenateCapitalized,
    "hyphenationPreference": hyphenationPreference,
    "justificationWordMinimum": justificationWordMinimum,
    "justificationWordDesired": justificationWordDesired,
    "justificationWordMaximum": justificationWordMaximum,
    "justificationLetterMinimum": justificationLetterMinimum,
    "justificationLetterDesired": justificationLetterDesired,
    "justificationLetterMaximum": justificationLetterMaximum,
    "justificationGlyphMinimum": justificationGlyphMinimum,
    "justificationGlyphDesired": justificationGlyphDesired,
    "justificationGlyphMaximum": justificationGlyphMaximum,
    "singleWordJustification": singleWordJustification,
    "hangingRoman": hangingRoman,
    "autoTCY": autoTCY,
    "keepTogether": keepTogether,
    "burasagari": burasagari,
    "preferredKinsokuOrder": preferredKinsokuOrder,
    "kurikaeshiMojiShori": kurikaeshiMojiShori,
    "kinsokuSetName": kinsokuSetName,
    "mojiKumiName": mojiKumiName,
    "textEveryLineComposer": textEveryLineComposer,
    "defaultTabWidth": defaultTabWidth,
    "defaultStyle": defaultStyle

alignment : string (among "left", "center", "right", "justifyLeft", "justifyCenter", "justifyRight", "justifyAll")
firstLineIndent : number
startIndent : number
endIndent : number
spaceBefore : number
spaceAfter : number
dropCapMultiplier : number
autoLeadingPercentage : number
leadingType : string (among "leadingAbove", "leadingBelow")
hyphenate : boolean
hyphenateWordSize : number
hyphenatePreLength : number
hyphenatePostLength : number
hyphenateLimit : number
hyphenationZone : number
hyphenateCapitalized : boolean
hyphenationPreference : number
justificationWordMinimum : number
justificationWordDesired : number
justificationWordMaximum : number
justificationLetterMinimum : number
justificationLetterDesired : number
justificationLetterMaximum : number
justificationGlyphMinimum : number
justificationGlyphDesired : number
justificationGlyphMaximum : number
singleWordJustification : string (among "justifyAll", …)
hangingRoman : boolean
autoTCY : number
keepTogether : boolean
burasagari : string (among "burasagariNone", "burasagariStandard", "burasagariStrong")
preferredKinsokuOrder : string (among "pushIn", "pushOutFirst", "pushOut")
kurikaeshiMojiShori : boolean
kinsokuSetName : string (among "None", "Soft", "Hard")
mojiKumiName : [optional] string (among "Photoshop6MojiKumiSet1", "Photoshop6MojiKumiSet2", "Photoshop6MojiKumiSet3", "Photoshop6MojiKumiSet4")
textEveryLineComposer : boolean
defaultTabWidth : number
defaultStyle : JSON object in Text style format

Kerning range

    "from": from,
    "to": to,
    "kerning": kerning

from : number
to : number
kerning : number


A color can be one of the following:

Book color

    "book": book,
    "name": name,
    "bookID": bookID,
    "bookKey": bookKey


    "book": book,
    "name": name


    "bookID": bookID,
    "bookKey": bookKey

book : string
name : string
bookID : number
bookKey : string

CMYK color

    "cyan": cyan,
    "magenta": magenta,
    "yellowColor": yellowColor,
    "black": black

cyan : number (percentage; 0% to 100%)
magenta : number (percentage; 0% to 100%)
yellowColor : number (percentage; 0% to 100%)
black : number (percentage; 0% to 100%)


    "gray": gray

gray : number (percentage; 0% to 100%)

HSB color

    "hue": hue,
    "saturation": saturation,
    "brightness": brightness

hue : number (0° to 360°)
saturation : number (percentage; 0% to 100%)
brightness : number (percentage; 0% to 100%)

Lab color

    "luminance": luminance,
    "a": a,
    "b": b

luminance : number (0 to 100)
a : number (-128 to 127)
b : number (-128 to 127)

RGB color

    "red": red,
    "green": green,
    "blue": blue

red : number (0 to 255)
green : number (0 to 255)
blue : number (0 to 255)


    "pathComponents": pathComponents,
    "unit": unit

pathComponents : JSON array of path components, each one being a JSON object in Path component format
unit : string (among Graphics units)

Path component

    "shapeOperation": shapeOperation,
    "subpathListKey": subpathListKey,
    "windingFill": windingFill

shapeOperation : string (among "add", "intersect", "subtract", "xor")
subpathListKey : JSON array of subpaths, each one being a JSON object in Subpath format
windingFill : [optional] boolean


    "points": points,
    "closedSubpath": closedSubpath

points : JSON array of points, each one being a JSON object in Path point format
closedSubpath : [optional] boolean

Path point

    "anchor": anchor,
    "forward": forward
    "backward": backward
    "smooth": smooth

anchor : JSON object in Point format
forward : [optional] JSON object in Point format
backward : [optional] JSON object in Point format
smooth : [optional] boolean


    "horizontal": horizontal,
    "vertical": vertical

horizontal : number
vertical : number


    "top": top,
    "left": left,
    "bottom": bottom,
    "right": right

top : number
left : number
bottom : number
right : number


    "start": start,
    "end": end

start : number
end : number


    "xx": xx,
    "xy": xy,
    "yx": yx,
    "yy": yy,
    "tx": tx,
    "ty": ty

xx : number
xy : number
yx : number
yy : number
tx : number
ty : number


    "warpStyle": warpStyle,
    "warpValue": warpValue,
    "warpPerspective": warpPerspective,
    "warpPerspectiveOther": warpPerspectiveOther,
    "warpRotate": warpRotate

warpStyle : string (among "warpNone", "warpArc", "warpArcLower", "warpArcUpper", "warpArch", "warpBulge", "warpShellLower", "warpShellUpper", "warpFlag", "warpWave", "warpFish", "warpRise", "warpFisheye", "warpInflate", "warpSqueeze", "warpTwist")
warpValue : number
warpPerspective : number
warpPerspectiveOther : number
warpRotate : string (among "horizontal", "vertical")

Type units

Common unit used for text measurement (rowGutter, columnGutter, spacing, firstBaselineMinimum, size, leading, baselineShift, underlineOffset, lineWidth, miterLimit, firstLineIndent, startIndent, endIndent, spaceBefore, spaceAfter):

  • “pixelsUnit”
  • “pointsUnit”
  • “millimetersUnit”

Graphics units

Common unit of the text shape’s path components (horizontal and vertical coordinates of anchor, forward, backward points) used for text along a path or text inside a path:

  • “pixelsUnit”
  • “distanceUnit”
  • “percentUnit”

Tags: , , , ,

Comments are closed.