I'm trying to make a JSX script for Photoshop and I'm having trouble with size AND leading.
When I set a textItem size it modifies the size as well as the leading.
If I modify the leading it will modifie the size as well.
How do I keep both?
In fact I was just modifying a layer's text using the textItem.contents property, but when I set the contents it will modify the textItem.size.

Code: Select all
var layerText = getMyTextLayer();
var textItem = layerText.textItem;
textItem.contents = _myText;
textItem.size = new UnitValue('44', 'pt');
textItem.leading = new UnitValue('52', 'pt');
Thanks!