5 Replies Latest reply on Nov 1, 2013 6:46 AM by Michael L Hale

    Text positioning??

    Abeilles

      Hello,

       

      I am trying to figure how to move around my text in Photoshop and I cant understand what coordinates you must use, please somebody help me i'm losing my mind here- i keep trying but failing!!!!!!

        • 1. Re: Text positioning??
          Ellis home Level 4

          If you are trying just to move around your text, with the Type Tool (T) click on the text and release, and then move your cursor away a bit until it changes to an arrow. Click and hold and it will allow you to move the text around.

          1 person found this helpful
          • 2. Re: Text positioning??
            Michael L Hale Level 5

            I assume you mean you are trying to move the text with a script.

             

            There is two ways you can move type. One way is with the textItem properties. The other way it with the artLayer.translate(). Which way are you trying to use?

            1 person found this helpful
            • 3. Re: Text positioning??
              Abeilles Level 1

              yeah sorry with script-  trying to move text with textItem properties but I cant figure out which coordinates to use-when I figure out the point I want them at and put it into the script they end up somewhere else entirely!!

              • 4. Re: Text positioning??
                pixxxel schubser MVP & Adobe Community Professional

                Try this:

                 

                var aLay= app.activeDocument.activeLayer;
                if(aLay.textItem && aLay.textItem.contents != "")
                alert(aLay.textItem.position);
                aLay.textItem.position = [100,100];
                app.refresh();
                alert(aLay.textItem.position);
                
                • 5. Re: Text positioning??
                  Michael L Hale Level 5

                  Two things to keep in mind. The position property accepts UnitValue objects. You can use number objects be then it will default to whatever the current ruler unit is set to in the GUI. So you should either use UnitValues or set the ruler unit before changing theposition.

                   

                  app.activeDocument.activeLayer.textItem.position = [UnitValue(10,'px'),UnitValue(20,'px')];

                   

                  The second thing to keep in mind it there are two types of text in Photoshop. PointText and ParagraphText. With paragraphText the position is determined from the top left corner of the bounding box. With pointText the position is determined from either the start of the text, the center of the text, or the end of the text depending on the justification property. So pointText can be the hardest to position using the position property if the text is centered or has right justification.