Photoshop – Aligning a text layer

This is just a quick post to share a revelation I had today in Photoshop CS5. It was something silly and stupid that was driving me crazy. I am sure its a small thing to most photoshop users.

Watermark Action
I was trying to set up an action to create my simple water mark that I use. I had about 500 images to batch convert from raw into small JPEGs for a client to proof. I wanted to include my water mark with some extra text on these proofs. The images were a mixture of portrait and landscape images. I was using the ‘image processor’ from bridge to do the resizing, which work as normal. It was the option to run an action at the time that I was trying to use to add the watermark.

Steps I took initially

  1. I was sending proofs with an 800 long side so I opened a portrait image and resized it to 800 on the long side
  2. Start recording a new action
  3. Press the ‘text’ tool and enter my text with appropriate size and opacity
  4. I then use the ‘move’ tool to move the text where I wanted it, lower left corner
  5. Stop the script

I then went back to the image, deleted the text layer I created and then ran the action to test it, it worked perfect. I then went to open another image, this time a landscape image and ran the script. This time the text was placed in a different location that did not look good. I went back into the action and seen that the element for the move gave absolute values, in cm.

This wrecked my head for about two hours while I tried different combinations and methods of moving this text layer that would work for both a portrait and landscape image. I have done plenty of googling but not much came up for moving a ‘text layer’. There was the ‘align’ tool for other layers, but that option was ghosted for this text only layer.

The Solution

I happened upon it by chance and I can’t remember which website I saw it on as I had about 10 tabs open at once. But the fix was like this:

  1. Open an image and resize it to 800 on the long side
  2. Start script recording
  3. Use the ‘text’ tool and create the text required – pay attention to the size of the text box and the empty space that is there. Keep this to a minimum as it will have an effect on the spacing
  4. It is now assumed that there are two layers, background and a text layer
  5. Set the layer opacity as needed
  6. Ctrl + Click on the background layer and the text layer, so both layers are now selected
  7. Now use the ‘Layer’ -> ‘Align’ menu which is now available to use as the background layer is also selected
  8. Align the layers as needed
  9. Stop recording
  10. Boom… done

Test the action. If you need more space from the bottom or from the sides, then this is there the ‘size of the text box’ some into play. Make the box bigger with more padding around it if you want. You can do this by say aligning the text in the centre of the text box.

Post a comment below if I didn’t explain it right or you want me to clear it up.

2 comments on “Photoshop – Aligning a text layer

Leave a Reply