Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I implement right align text with photoshop script?

New Here ,
Nov 09, 2022 Nov 09, 2022
var txlayerRef = app.activeDocument.artLayers.add()
txlayerRef.kind = LayerKind.TEXT;
txlayerRef.name = "info";
var myTextRef = txlayerRef.textItem;
myTextRef.contents = "*Do what you want\r*till the end";
myTextRef.font = "Arial";
myTextRef.AnchorPosition = "MIDDLECENTER";
myTextRef.size = 10;

Within photoshop script, How can I align text to right side?

Can't find reference from "photoshop-javascript-ref-2020"..

 

TOPICS
Actions and scripting
918
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 09, 2022 Nov 09, 2022

Hi @curtis.Y 

You mean justification, if yes then add following line of code in your's code

myTextRef.justification = Justification.RIGHT;

 

Translate
Adobe
Community Expert ,
Nov 09, 2022 Nov 09, 2022

Hi @curtis.Y 

You mean justification, if yes then add following line of code in your's code

myTextRef.justification = Justification.RIGHT;

 

Best regards
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 09, 2022 Nov 09, 2022

Align is the correct typographic term. The masses, including graphics software devs who should know better, simply use justification to mean align.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 09, 2022 Nov 09, 2022

Actually, I believe justification is the correct term, as there is right, center, left, and full justification. I don't think there is a full alignment.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 09, 2022 Nov 09, 2022

Not according to this former compositor. :]

 

There is left, right or centre alignment (range), with justification having the same alignment/range for the short last line in a paragraph.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 09, 2022 Nov 09, 2022
LATEST

Hi!

I would side with Stephen, there's L/C/R align, or justified.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines