Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Leading always set to Auto

$
0
0

I'm using the following function and while I'm always setting the leading to a value, in the Photoshop UI it is set to AUTO (and the leading use is incorrect), any idea what I might be doing incorrectly?

 

function createText(artLayerRef, fface, size, colR, colG, colB, content, tX, tY)

{

  artLayerRef.kind = LayerKind.TEXT

 

  //This section defines the color of the hello world text

  textColor = new SolidColor();

  textColor.rgb.red = colR;

  textColor.rgb.green = colG;

  textColor.rgb.blue = colB;

 

 

  //Get a reference to the text item so that we can add the text and format it a bit

  textItemRef = artLayerRef.textItem;

  textItemRef.kind = TextType.PARAGRAPHTEXT;

  textItemRef.contents = content;

  textItemRef.font = fface;

  textItemRef.color = textColor;

  textItemRef.width = 110;

  textItemRef.height = size/2;

  textItemRef.justification=Justification.CENTER;

  textItemRef.size = size;

 

  textItemRef.position = new Array(tX, tY) //pixels from the left, pixels from the top

 

   textItemRef.leading = size; //also tried explicit integer values

 

  textItemRef.hyphenation = false;

}


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>