Adjust the space between two letters

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

rcvalle

Adjust the space between two letters

Post by rcvalle »

Hi,

Is it possible to adjust the space between two letters (manual kerning)[1] within a script?

Best regards,


[1] http://help.adobe.com/en_US/photoshop/c ... E013a.html ... E013a.html

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

txuku

Adjust the space between two letters

Post by txuku »

Hello rcvalle

You look in the JavaScript Reference Guide paragraph TextItem - something like minimumLetterScaling and minimumWordScaling and .....

Code: Select allnewTextLayer.textItem.justification = Justification.CENTERJUSTIFIED;
    newTextLayer.textItem.minimumLetterScaling = 200;
    newTextLayer.textItem.minimumWordScaling = 500;
Mike Hale

Adjust the space between two letters

Post by Mike Hale »

The short answer is no, you can't adjust the kerning between two letters like Wa or Fi with a script.

To do that in a script you need to work with action manager code. You need to read in the current textItem descriptor, edit it setting text ranges for the two letters with that range having it's own settings, then write the descriptor back to the layer. So it can be done. X has code here( and part of xtools ) that will allow a script to change text size and color of letters in a textItem. His demo code works just fine. But using it takes knowledge of the textItem descriptor and I think is really to much work to be practicable.
rcvalle

Adjust the space between two letters

Post by rcvalle »

It's really a shame. It would be helpful if this were implemented in future versions of Photoshop API.
Thank you txuku and Mike.
xbytor

Adjust the space between two letters

Post by xbytor »

If you really need to do detailed work with text, you are far better off using InDesign.
It has an incredibly rich API for working with text.
rcvalle

Adjust the space between two letters

Post by rcvalle »

I will look at it. Thank you!