Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's pretty annoying that you can't center text vertically in Ps automatically, like you can in Indd. It's even more annoying that the bounding box of text can't be 'collapsed' or 'fit to text', like in Indd.

I could convert the text to shape, but then I lose coloring. I could convert to smart object, but then its not vector anymore, for when I export to pdf.

Is there a work around anyone knows of that would make it easier to center text vertically?

share|improve this question

For positioning text you don't need a bounding box.

I never use bounding boxes for text in PS. I click the text tool without dragging and set the text cursor without a box. Once the text is entered, I can center it vertically or horizontally just like any other shape using the align buttons--assuming I have something to align it to.

I do the same thing in Illustrator. As an example, I was making an award ribbon, a circle with text in the center. I made the circle, then wrote three lines of text, center aligned with no bounding box, not even close to the center of the circle. I then selected both the circle and the text, and hit vertical align center, horizontal align center, and the text is perfectly centered in the circle.

centered text without bounding box

share|improve this answer

Although it's not automatic (you need to adjust it manually for each text), you can use Baseline Shift to 'imitate' a vertical centering:

enter image description here

share|improve this answer

I'd love to be proven wrong on this, but you can't vertically center text in Photoshop automatically. Just like you can't do it in Illustrator. You're stuck with manually adjusting the baseline shift.

Here is the inevitable...

but you can do this is InDesign.

Yes, and it's awesome. But PS and AI are stuck without it. :(


EDIT: Dang! I thought @Yisela's answer was part of the question. Sorry about that.

share|improve this answer

Here's a script I wrote that might work. I've not tested it yet however.

centerTextVertically( app.activeDocument.artLayers.getByName( 'Text-Layer-Name' ) );

/**
 * @param {ArtLayer} textLayer  The text layer to apply the vertical centering.
 */
function centerTextVertically( textLayer ) {
    if ( textLayer.kind !== LayerKind.TEXT ) {
        return; // No-op: Not a text layer
    }

    var verticalCenterOffset = textLayer.textItem.height / 2;
    var textCenterOffset = textLayer.textItem.size / 2;
    textLayer.textItem.baselineShift = verticalCenterOffset - textCenterOffset;
}
share|improve this answer

I found a way today that I didn't know, it is partly as Michael Osterhus says, but I didn't really get what he meant to begin with.

  1. You need to write your text with just a single click, not a draggable bounding box. This can be placed wherever you want.
  2. Next step you create a box, I used the Rectangle tool to create a box of the area where I wanted my text to be aligned both vertically and horizontal with.
  3. Then I selected both the text layer and the rectangle layer and with both of them selected I went up into Layer -> Align and pressed both Vertical centers and Horizontal centers

This simple tactic gave me the exact result that I was out after, so this nifty trick is very very useful when you need to center text in someway.

If that wasn't obvious before, the text aligns horizontal and vertical relatively to the rectangle that you draw, so if you want your text to be vertical aligned over the whole document, you need to have a rectangle at that size and so on.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.