Text document
TextDocument
¶
Stores a value for a TextLayer's Source Text property.
Example
See: https://ae-scripting.docsforadobe.dev/text/textdocument/
Attributes¶
apply_fill
¶
When True, the Text layer shows a fill. Read / Write.
apply_stroke
¶
When True, the Text layer shows a stroke. Read / Write.
auto_hyphenate
¶
The Text layer's auto hyphenate option. Read / Write.
auto_kern_type
¶
auto_kern_type = enum(
AutoKernType, "_char_style", "11", default=NO_AUTO_KERN
)
The Text layer's auto kern type option. Read / Write.
auto_leading
¶
The Text layer's auto leading option. Read / Write.
baseline_direction
¶
baseline_direction = enum(
BaselineDirection,
"_char_style",
"35",
default=BASELINE_WITH_STREAM,
)
The Text layer's baseline direction. Read / Write.
baseline_shift
¶
This Text layer's baseline shift in pixels. Read / Write.
box_auto_fit_policy
¶
box_auto_fit_policy: BoxAutoFitPolicy
The box's auto-fit policy. Read / Write.
box_first_baseline_alignment
¶
box_first_baseline_alignment: BoxFirstBaselineAlignment
The box's first-baseline alignment. Read / Write.
box_first_baseline_alignment_minimum
¶
box_first_baseline_alignment_minimum: float
The minimum for MINIMUM_VALUE_* first-baseline alignment. R/W.
box_inset_spacing
¶
box_inset_spacing: float
The box's inset (padding) spacing in pixels. Read / Write.
box_text
¶
box_text: bool
True if this is a box (paragraph) text layer. Read-only.
Box text stores the bounding-box vertex array in the frame; point text omits it.
box_text_pos
¶
The top-left position of the text box as [x, y]. Read / Write.
None for point text. Setting moves the box while keeping its
size; requires box (paragraph) text.
box_text_size
¶
The size of the text box as [width, height]. Read / Write.
None for point text. Setting dimensions on point text converts
it into a box (paragraph) text layer; on box text it resizes the
box while keeping its top-left corner fixed.
box_vertical_alignment
¶
box_vertical_alignment: BoxVerticalAlignment
The box's vertical text alignment. Read / Write.
composed_line_count
¶
composed_line_count: int | None
The number of composed lines in the Text layer. Read-only.
composer_engine
¶
composer_engine: ComposerEngine | None
The Text layer's composer engine type. Read-only.
digit_set
¶
digit_set = enum(
DigitSet, "_char_style", "70", default=DEFAULT_DIGITS
)
The Text layer's digit set option. Read / Write.
direction
¶
direction = enum(
ParagraphDirection,
"_para_style",
"33",
default=DIRECTION_LEFT_TO_RIGHT,
)
The Text layer's paragraph direction. Read / Write.
end_indent
¶
The Text layer's paragraph end indent. Read / Write.
every_line_composer
¶
The Text layer's Every-Line Composer option. Read / Write.
True when Every-Line Composer is used, False for Single-Line.
faux_bold
¶
True if a Text layer has faux bold enabled. Read / Write.
faux_italic
¶
True if a Text layer has faux italic enabled. Read / Write.
first_line_indent
¶
The Text layer's paragraph first line indent. Read / Write.
font_baseline_option
¶
font_baseline_option = enum(
FontBaselineOption, "_char_style", "13", default=None
)
The Text layer's font baseline option. Read / Write.
font_caps_option
¶
font_caps_option = enum(
FontCapsOption, "_char_style", "12", default=None
)
The Text layer's font caps option. Read / Write.
font_size
¶
The Text layer's font size in pixels. Read / Write.
hanging_roman
¶
The Text layer's Roman Hanging Punctuation. Read / Write.
horizontal_scale
¶
This Text layer's horizontal scale in pixels. Read / Write.
justification
¶
justification = enum(
ParagraphJustification, "_para_style", "0", default=None
)
The paragraph justification for the Text layer. Read / Write.
kerning
¶
kerning: int
The Text layer's kerning value. Read-only.
AE stores a uniform manual-kerning value at the document level;
per-pair kerning is not exposed. Returns 0 when unset (the
default for metric / optical auto-kerning).
leading
¶
leading: float | None
The Text layer's spacing between lines. Read / Write.
When auto-leading is enabled, returns font_size * auto_leading_factor.
leading_type
¶
leading_type = enum(
LeadingType,
"_para_style",
"8",
default=ROMAN_LEADING_TYPE,
)
The Text layer's paragraph leading type. Read / Write.
ligature
¶
When True, ligature is used. Read / Write.
line_join_type
¶
line_join_type = enum(
LineJoinType,
"_char_style",
"62",
default=LINE_JOIN_MITER,
)
The Text layer's line join type for strokes. Read / Write.
line_orientation
¶
line_orientation: LineOrientation
The Text layer's line orientation. Read / Write.
no_break
¶
When True, the no-break attribute is applied. Read / Write.
paragraph_count
¶
paragraph_count: int | None
The number of paragraphs in the text layer. Read-only.
space_after
¶
The Text layer's paragraph space after. Read / Write.
space_before
¶
The Text layer's paragraph space before. Read / Write.
start_indent
¶
The Text layer's paragraph start indent. Read / Write.
stroke_color
¶
The Text layer's stroke color as [r, g, b]. Read / Write.
stroke_over_fill
¶
When True, the stroke appears over the fill. Read / Write.
stroke_width
¶
The Text layer's stroke thickness in pixels. Read / Write.
tracking
¶
The Text layer's spacing between characters. Read / Write.
tsume
¶
This Text layer's tsume value (0.0 to 1.0). Read / Write.
vertical_scale
¶
This Text layer's vertical scale in pixels. Read / Write.