3 Replies Latest reply on Sep 17, 2015 5:02 AM by cwodwrth

    Leading always set to Auto


      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.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;