Skip to content

text_item

TextItem

Bases: Photoshop

The text that is associated with the layer. Valid only when ‘kind’ is text layer.

Source code in photoshop/api/text_item.py
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
class TextItem(Photoshop):
    """The text that is associated with the layer. Valid only when ‘kind’ is text layer."""

    object_name = "Application"

    def __init__(self, parent):
        super().__init__(parent=parent)
        self._flag_as_method(
            "convertToShape",
            "createPath",
        )

    @property
    def alternateLigatures(self):
        return self.app.alternateLigatures

    @alternateLigatures.setter
    def alternateLigatures(self, value):
        self.app.alternateLigatures = value

    @property
    def antiAliasMethod(self) -> AntiAlias:
        """The method of antialiasing to use."""
        return AntiAlias(self.app.antiAliasMethod)

    @antiAliasMethod.setter
    def antiAliasMethod(self, value):
        self.app.antiAliasMethod = value

    @property
    def autoKerning(self) -> AutoKernType:
        """The auto kerning option to use."""
        return AutoKernType(self.app.autoKerning)

    @autoKerning.setter
    def autoKerning(self, value):
        self.app.autoKerning = value

    @property
    def autoLeadingAmount(self):
        return self.app.autoLeadingAmount

    @autoLeadingAmount.setter
    def autoLeadingAmount(self, value):
        """The percentage to use for auto (default) leading (in points).

        Valid only when useAutoLeading = True.

        """
        self.app.useAutoLeading = True
        self.app.autoLeadingAmount = value

    @property
    def baselineShift(self):
        """The unit value to use in the baseline offset of text."""
        return self.app.baselineShift

    @baselineShift.setter
    def baselineShift(self, value):
        self.app.baselineShift = value

    @property
    def capitalization(self):
        """Gets text case."""
        return self.app.capitalization

    @capitalization.setter
    def capitalization(self, value):
        """Sets text case."""
        self.app.capitalization = value

    @property
    def color(self) -> SolidColor:
        """The text color."""
        return SolidColor(self.app.color)

    @color.setter
    def color(self, color_value):
        """The color of textItem."""
        self.app.color = color_value

    @property
    def contents(self) -> str:
        """The actual text in the layer."""
        return self.app.contents

    @contents.setter
    def contents(self, text: str):
        """Set the actual text in the layer.

        Args:
            text: The actual text.

        """
        self.app.contents = text

    @property
    def desiredGlyphScaling(self):
        """The desired amount by which to scale the horizontal size of the
        text letters. A percentage value; at 100, the width of characters is
        not scaled."""
        return self.app.desiredGlyphScaling

    @desiredGlyphScaling.setter
    def desiredGlyphScaling(self, value):
        self.app.desiredGlyphScaling = value

    @property
    def desiredLetterScaling(self):
        """The amount of space between letters .
        (at 0, no space is added between letters).
        Equivalent to Letter Spacing in the Justification
        dialog (Select Justification on the Paragraphs palette menu).
        Valid only when justification = Justification.CENTERJUSTIFIED,
                                                      FULLYJUSTIFIED,
                                                      LEFTJUSTIFIED, or
                                        Justification.RIGHTJUSTIFIED.
        When used, the minimumLetterScaling and
        maximumLetterScaling values are also required.

        """
        return self.app.desiredLetterScaling

    @desiredLetterScaling.setter
    def desiredLetterScaling(self, value):
        self.app.desiredGlyphScaling = value

    @property
    def desiredWordScaling(self):
        """
        The amount (percentage) of space
        between words (at 100, no additional space is added
        between words).
        Equivalent to Word Spacing in the Justification
        dialog (Select Justification on the Paragraphs
        palette menu).
        Valid only when justification =
        Justification.CENTERJUSTIFIED,
        FULLYJUSTIFIED, LEFTJUSTIFIED, or
        Justification.RIGHTJUSTIFIED.
        When used, the minimumWordScaling and
        maximumWordScaling values are also required

        """
        return self.app.desiredWordScaling

    @desiredWordScaling.setter
    def desiredWordScaling(self, value):
        self.app.desiredWordScaling = value

    @property
    def direction(self):
        """The text orientation."""
        return Direction(self.app.direction)

    @direction.setter
    def direction(self, value):
        self.app.direction = value

    @property
    def fauxBold(self):
        """True to use faux bold (default: false).

        Setting this to true is equivalent to selecting text and
        clicking Faux Bold in the Character palette.

        """
        return self.app.fauxBold

    @fauxBold.setter
    def fauxBold(self, value):
        self.app.fauxBold = value

    @property
    def fauxItalic(self):
        """True to use faux italic (default: false).

        Setting this to true is equivalent to selecting text and
        clicking Faux Italic in the Character palette.

        """
        return self.app.fauxItalic

    @fauxItalic.setter
    def fauxItalic(self, value):
        self.app.fauxItalic = value

    @property
    def firstLineIndent(self):
        """The amount (unit value) to indent the first line of paragraphs."""
        return self.app.firstLineIndent

    @firstLineIndent.setter
    def firstLineIndent(self, value):
        self.app.firstLineIndent = value

    @property
    def font(self) -> str:
        """str: postScriptName of the TextItem's font."""
        return self.app.font

    @font.setter
    def font(self, text_font: str):
        """Set the font of this TextItem.

        Args:
            text_font (str): Must provide the postScriptName of a valid font.
        """
        self.app.font = text_font

    @property
    def hangingPunctuation(self) -> bool:
        """bool: Whether to use Roman hanging punctuation."""
        return self.app.hangingPunctuation

    @hangingPunctuation.setter
    def hangingPunctuation(self, value: bool):
        self.app.hangingPunctuation = value

    @property
    def height(self):
        """int: The height of the bounding box for paragraph text."""
        return self.app.height

    @height.setter
    def height(self, value):
        self.app.height = value

    @property
    def horizontalScale(self) -> int:
        """Character scaling (horizontal) in proportion to verticalScale (a percentage value)."""
        return self.app.horizontalScale

    @horizontalScale.setter
    def horizontalScale(self, value: int):
        """Set the horizontalScale of this TextItem.

        Args:
            value: An integer between 0 and 1000.
        """
        self.app.horizontalScale = value

    @property
    def hyphenateAfterFirst(self):
        """The number of letters after which hyphenation in word wrap is allowed."""
        return self.app.hyphenateAfterFirst

    @hyphenateAfterFirst.setter
    def hyphenateAfterFirst(self, value):
        self.app.hyphenateAfterFirst = value

    @property
    def hyphenateBeforeLast(self):
        """The number of letters before which hyphenation in word wrap is allowed."""
        return self.app.hyphenateBeforeLast

    @hyphenateBeforeLast.setter
    def hyphenateBeforeLast(self, value):
        self.app.hyphenateBeforeLast = value

    @property
    def hyphenateCapitalWords(self):
        """True to allow hyphenation in word wrap of capitalized words"""
        return self.app.hyphenateCapitalWords

    @hyphenateCapitalWords.setter
    def hyphenateCapitalWords(self, value):
        self.app.hyphenateCapitalWords = value

    @property
    def hyphenateWordsLongerThan(self):
        """The minimum number of letters a word must have in order for
        hyphenation in word wrap to be allowed."""
        return self.app.hyphenateWordsLongerThan

    @hyphenateWordsLongerThan.setter
    def hyphenateWordsLongerThan(self, value):
        self.app.hyphenateWordsLongerThan = value

    @property
    def hyphenation(self):
        """True to use hyphenation in word wrap."""
        return self.app.hyphenation

    @hyphenation.setter
    def hyphenation(self, value):
        self.app.hyphenation = value

    @property
    def hyphenationZone(self):
        """The distance at the end of a line that will cause a word to break in
        unjustified type."""
        return self.app.hyphenationZone

    @hyphenationZone.setter
    def hyphenationZone(self, value):
        self.app.hyphenationZone = value

    @property
    def hyphenLimit(self):
        return self.app.hyphenLimit

    @hyphenLimit.setter
    def hyphenLimit(self, value):
        self.app.hyphenLimit = value

    @property
    def justification(self):
        """The paragraph justification."""
        return Justification(self.app.justification)

    @justification.setter
    def justification(self, value):
        self.app.justification = value

    @property
    def kind(self):
        return TextType(self.app.kind)

    @kind.setter
    def kind(self, kind_type):
        self.app.kind = kind_type

    @property
    def language(self):
        return Language(self.app.language)

    @language.setter
    def language(self, text):
        self.app.language = text

    @property
    def leading(self):
        return self.app.leading

    @leading.setter
    def leading(self, value):
        self.app.leading = value

    @property
    def leftIndent(self):
        """The amoun of space to indent text from the left."""
        return self.app.leftIndent

    @leftIndent.setter
    def leftIndent(self, value):
        self.app.leftIndent = value

    @property
    def ligatures(self):
        """True to use ligatures."""
        return self.app.ligatures

    @ligatures.setter
    def ligatures(self, value):
        self.app.ligatures = value

    @property
    def maximumGlyphScaling(self):
        """The maximum amount to scale the horizontal size of the text letters
        (a percentage value; at 100, the width of characters is not scaled).

        Valid only when justification =
        Justification.CENTERJUSTIFIED,
        FULLYJUSTIFIED, LEFTJUSTIFIED, or
        Justification.RIGHTJUSTIFIED.
        When used, the minimumGlyphScaling and
        desiredGlyphScaling values are also required.

        """
        return self.app.maximumGlyphScaling

    @maximumGlyphScaling.setter
    def maximumGlyphScaling(self, value):
        self.app.maximumGlyphScaling = value

    @property
    def maximumLetterScaling(self):
        """The maximum amount of space to allow between letters

        (at 0, no space is added between letters).
        Equivalent to Letter Spacing in the Justification
        dialog (Select Justification on the Paragraphs
        palette menu).
        Valid only when justification =
        Justification.CENTERJUSTIFIED,
        FULLYJUSTIFIED, LEFTJUSTIFIED, or
        Justification.RIGHTJUSTIFIED.
        When used, the minimumLetterScaling and
        desiredLetterScaling values are also required.

        """
        return self.app.maximumLetterScaling

    @maximumLetterScaling.setter
    def maximumLetterScaling(self, value):
        self.app.maximumLetterScaling = value

    @property
    def maximumWordScaling(self):
        return self.app.maximumWordScaling

    @maximumWordScaling.setter
    def maximumWordScaling(self, value):
        self.app.maximumWordScaling = value

    @property
    def minimumGlyphScaling(self):
        """The minimum amount to scale the horizontal size of the text letters
        (a percentage value; at 100, the width of characters is not scaled).

        Valid only when justification =
        Justification.CENTERJUSTIFIED,
        FULLYJUSTIFIED, LEFTJUSTIFIED, or
        Justification.RIGHTJUSTIFIED.
        When used, the maximumGlyphScaling and
        desiredGlyphScaling values are also required.

        """
        return self.app.minimumGlyphScaling

    @minimumGlyphScaling.setter
    def minimumGlyphScaling(self, value):
        self.app.minimumGlyphScaling = value

    @property
    def minimumLetterScaling(self):
        """The minimum amount of space to allow between letters

        (a percentage value; at 0, no space is removed between letters).

        Equivalent to Letter Spacing in the Justification
        dialog (Select Justification on the Paragraphs
        palette menu).
        Valid only when justification =
        Justification.CENTERJUSTIFIED,
        FULLYJUSTIFIED, LEFTJUSTIFIED, or
        Justification.RIGHTJUSTIFIED.
        When used, the maximumLetterScaling and
        desiredLetterScaling values are also required.

        """
        return self.app.minimumLetterScaling

    @minimumLetterScaling.setter
    def minimumLetterScaling(self, value):
        self.app.minimumLetterScaling = value

    @property
    def minimumWordScaling(self):
        """The minimum amount of space to allow between words

        (a percentage value; at 100, no additional space is removed between words).

        Equivalent to Word Spacing in the Justification
        dialog (Select Justification on the Paragraphs
        palette menu).
        Valid only when justification =
        Justification.CENTERJUSTIFIED,
        FULLYJUSTIFIED, LEFTJUSTIFIED, or
        Justification.RIGHTJUSTIFIED.
        When used, the maximumWordScaling and
        desiredWordScaling values are also required.

        """
        return self.app.minimumWordScaling

    @minimumWordScaling.setter
    def minimumWordScaling(self, value):
        self.app.minimumWordScaling = value

    @property
    def noBreak(self):
        """True to disallow line breaks in this text.

        Tip: When true for many consecutive characters, can
        prevent word wrap and thus may prevent some
        text from appearing on the screen.

        """
        return self.app.noBreak

    @noBreak.setter
    def noBreak(self, value):
        self.app.noBreak = value

    @property
    def oldStyle(self):
        return self.app.oldStyle

    @oldStyle.setter
    def oldStyle(self, value):
        self.app.oldStyle = value

    @property
    def parent(self):
        return self.app.parent

    @parent.setter
    def parent(self, value):
        self.app.parent = value

    @property
    def position(self):
        return self.app.position

    @position.setter
    def position(self, array):
        """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 documents to
        create the point of origin for text.

        """
        self.app.position = array

    @property
    def rightIndent(self):
        return self.app.rightIndent

    @rightIndent.setter
    def rightIndent(self, value):
        self.app.rightIndent = value

    @property
    def size(self):
        """The font size in UnitValue.

        NOTE: Type was points for CS3 and older.

        """
        return self.app.size

    @size.setter
    def size(self, value):
        self.app.size = value

    @property
    def spaceAfter(self):
        """The amount of space to use after each paragraph."""
        return self.app.spaceAfter

    @spaceAfter.setter
    def spaceAfter(self, value):
        self.app.spaceAfter = value

    @property
    def spaceBefore(self):
        return self.app.spaceBefore

    @spaceBefore.setter
    def spaceBefore(self, value):
        self.app.spaceBefore = value

    @property
    def strikeThru(self):
        """The text strike-through option to use."""
        return StrikeThruType(self.app.strikeThru)

    @strikeThru.setter
    def strikeThru(self, value):
        self.app.strikeThru = value

    @property
    def textComposer(self):
        return TextComposer(self.app.textComposer)

    @textComposer.setter
    def textComposer(self, value):
        self.app.textComposer = value

    @property
    def tracking(self):
        return self.app.tracking

    @tracking.setter
    def tracking(self, value):
        self.app.tracking = value

    @property
    def underline(self):
        """The text underlining options."""
        return self.app.underline

    @underline.setter
    def underline(self, value):
        self.app.underline = value

    @property
    def useAutoLeading(self):
        return self.app.useAutoLeading

    @useAutoLeading.setter
    def useAutoLeading(self, value):
        self.app.useAutoLeading = value

    @property
    def verticalScale(self):
        return self.app.verticalScale

    @verticalScale.setter
    def verticalScale(self, value):
        self.app.verticalScale = value

    @property
    def warpBend(self):
        """The warp bend percentage."""
        return self.app.warpBend

    @warpBend.setter
    def warpBend(self, value):
        self.app.warpBend = value

    @property
    def warpDirection(self) -> Direction:
        """The warp direction."""
        return Direction(self.app.warpDirection)

    @warpDirection.setter
    def warpDirection(self, value):
        self.app.warpDirection = value

    @property
    def warpHorizontalDistortion(self):
        return self.app.warpHorizontalDistortion

    @warpHorizontalDistortion.setter
    def warpHorizontalDistortion(self, value):
        self.app.warpHorizontalDistortion = value

    @property
    def warpStyle(self):
        """The style of warp to use."""
        return self.app.warpStyle

    @warpStyle.setter
    def warpStyle(self, value):
        self.app.warpStyle = value

    @property
    def warpVerticalDistortion(self):
        return self.app.warpVerticalDistortion

    @warpVerticalDistortion.setter
    def warpVerticalDistortion(self, value):
        self.app.warpVerticalDistortion = value

    @property
    def width(self):
        """The width of the bounding box for

        paragraph text.
        Valid only when kind = TextType.PARAGRAPHTEXT.

        """
        return self.app.width

    @width.setter
    def width(self, value: float):
        """The width of the bounding box for

        paragraph text.
        Valid only when kind = TextType.PARAGRAPHTEXT.

        """
        self.app.width = value

    def convertToShape(self):
        """Converts the text item and its containing layer to a fill layer with the
        text changed to a clipping path."""
        return self.app.convertToShape()

    def createPath(self):
        """Creates a clipping path from the outlines of the actual text items

        (such as letters or words).

        """
        return self.app.createPath()

antiAliasMethod: AntiAlias property writable

The method of antialiasing to use.

autoKerning: AutoKernType property writable

The auto kerning option to use.

baselineShift property writable

The unit value to use in the baseline offset of text.

capitalization property writable

Gets text case.

color: SolidColor property writable

The text color.

contents: str property writable

The actual text in the layer.

desiredGlyphScaling property writable

The desired amount by which to scale the horizontal size of the text letters. A percentage value; at 100, the width of characters is not scaled.

desiredLetterScaling property writable

The amount of space between letters . (at 0, no space is added between letters). Equivalent to Letter Spacing in the Justification dialog (Select Justification on the Paragraphs palette menu). Valid only when justification = Justification.CENTERJUSTIFIED, FULLYJUSTIFIED, LEFTJUSTIFIED, or Justification.RIGHTJUSTIFIED. When used, the minimumLetterScaling and maximumLetterScaling values are also required.

desiredWordScaling property writable

The amount (percentage) of space between words (at 100, no additional space is added between words). Equivalent to Word Spacing in the Justification dialog (Select Justification on the Paragraphs palette menu). Valid only when justification = Justification.CENTERJUSTIFIED, FULLYJUSTIFIED, LEFTJUSTIFIED, or Justification.RIGHTJUSTIFIED. When used, the minimumWordScaling and maximumWordScaling values are also required

direction property writable

The text orientation.

fauxBold property writable

True to use faux bold (default: false).

Setting this to true is equivalent to selecting text and clicking Faux Bold in the Character palette.

fauxItalic property writable

True to use faux italic (default: false).

Setting this to true is equivalent to selecting text and clicking Faux Italic in the Character palette.

firstLineIndent property writable

The amount (unit value) to indent the first line of paragraphs.

font: str property writable

hangingPunctuation: bool property writable

height property writable

horizontalScale: int property writable

Character scaling (horizontal) in proportion to verticalScale (a percentage value).

hyphenateAfterFirst property writable

The number of letters after which hyphenation in word wrap is allowed.

hyphenateBeforeLast property writable

The number of letters before which hyphenation in word wrap is allowed.

hyphenateCapitalWords property writable

True to allow hyphenation in word wrap of capitalized words

hyphenateWordsLongerThan property writable

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

hyphenation property writable

True to use hyphenation in word wrap.

hyphenationZone property writable

The distance at the end of a line that will cause a word to break in unjustified type.

justification property writable

The paragraph justification.

leftIndent property writable

The amoun of space to indent text from the left.

ligatures property writable

True to use ligatures.

maximumGlyphScaling property writable

The maximum amount to scale the horizontal size of the text letters (a percentage value; at 100, the width of characters is not scaled).

Valid only when justification = Justification.CENTERJUSTIFIED, FULLYJUSTIFIED, LEFTJUSTIFIED, or Justification.RIGHTJUSTIFIED. When used, the minimumGlyphScaling and desiredGlyphScaling values are also required.

maximumLetterScaling property writable

The maximum amount of space to allow between letters

(at 0, no space is added between letters). Equivalent to Letter Spacing in the Justification dialog (Select Justification on the Paragraphs palette menu). Valid only when justification = Justification.CENTERJUSTIFIED, FULLYJUSTIFIED, LEFTJUSTIFIED, or Justification.RIGHTJUSTIFIED. When used, the minimumLetterScaling and desiredLetterScaling values are also required.

minimumGlyphScaling property writable

The minimum amount to scale the horizontal size of the text letters (a percentage value; at 100, the width of characters is not scaled).

Valid only when justification = Justification.CENTERJUSTIFIED, FULLYJUSTIFIED, LEFTJUSTIFIED, or Justification.RIGHTJUSTIFIED. When used, the maximumGlyphScaling and desiredGlyphScaling values are also required.

minimumLetterScaling property writable

The minimum amount of space to allow between letters

(a percentage value; at 0, no space is removed between letters).

Equivalent to Letter Spacing in the Justification dialog (Select Justification on the Paragraphs palette menu). Valid only when justification = Justification.CENTERJUSTIFIED, FULLYJUSTIFIED, LEFTJUSTIFIED, or Justification.RIGHTJUSTIFIED. When used, the maximumLetterScaling and desiredLetterScaling values are also required.

minimumWordScaling property writable

The minimum amount of space to allow between words

(a percentage value; at 100, no additional space is removed between words).

Equivalent to Word Spacing in the Justification dialog (Select Justification on the Paragraphs palette menu). Valid only when justification = Justification.CENTERJUSTIFIED, FULLYJUSTIFIED, LEFTJUSTIFIED, or Justification.RIGHTJUSTIFIED. When used, the maximumWordScaling and desiredWordScaling values are also required.

noBreak property writable

True to disallow line breaks in this text.

Tip: When true for many consecutive characters, can prevent word wrap and thus may prevent some text from appearing on the screen.

size property writable

The font size in UnitValue.

NOTE: Type was points for CS3 and older.

spaceAfter property writable

The amount of space to use after each paragraph.

strikeThru property writable

The text strike-through option to use.

underline property writable

The text underlining options.

warpBend property writable

The warp bend percentage.

warpDirection: Direction property writable

The warp direction.

warpStyle property writable

The style of warp to use.

width property writable

The width of the bounding box for

paragraph text. Valid only when kind = TextType.PARAGRAPHTEXT.

convertToShape()

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

Source code in photoshop/api/text_item.py
682
683
684
685
def convertToShape(self):
    """Converts the text item and its containing layer to a fill layer with the
    text changed to a clipping path."""
    return self.app.convertToShape()

createPath()

Creates a clipping path from the outlines of the actual text items

(such as letters or words).

Source code in photoshop/api/text_item.py
687
688
689
690
691
692
693
def createPath(self):
    """Creates a clipping path from the outlines of the actual text items

    (such as letters or words).

    """
    return self.app.createPath()

Last update: 2024-11-17
Created: 2024-11-17