4 Replies Latest reply on Sep 9, 2012 3:50 AM by Peter Spier

    How can I perfectly vertical center text with various font sizes

    TamiBD63 Level 1

      Hi,

       

      I have the following frame:

      http://www.flickr.com/photos/82397830@N03/7960870684/

       

      I tried vertical centering by setting Text Frame Options > Vertical Justification > Align: Center, however my text still isn't getting vertical centered. When I put english words instead of hebrew ones the text does get vertical centered.

        • 1. Re: How can I perfectly vertical center text with various font sizes
          Michael Gianino Level 4

          There is a sort-of invisible frame around characters of a font. The frame measures from the lowest portion of characters that dip below the baseline (like p and j) up higher than the tops of the capitol letters to accommodate diacritic marks like umlauts and accents. Since most characters don't go all the way to the highest ascender or down to the lowest decender, it can appear that text isn't centered between two vertical points.

           

          If you need the text to be centered exactly, you can cheat it by applying baseline shift, but keep in mind that if you change the text, you may have to tweak the amount of baseline shift again. You can either apply baseline shift to the text itself, or edit the text frame options and change the Baseline Options. Also, in your screenshot, I see that you have rounded corners on your text frame. Vertical justification only works on rectangular text frames, so that's why that isn't working.

          • 2. Re: How can I perfectly vertical center text with various font sizes
            TamiBD63 Level 1

            Thank you very much for your explanation, really saved me the headache of wondering whether it is possible to automatically center this sort of text.

            • 3. Re: How can I perfectly vertical center text with various font sizes
              Laubender Adobe Community Professional & MVP

              @Tami – Basically it is:
              numeric way calculating even spacing  vs.   geometric oriented way calculating white space*

               

              *and maybe taking into account the "grey level" of the font in contrast to the background color and some more subtle ingredients for decission making where a given set of background/foreground elements are positioned in a balanced way. Not to forget the surrounding elements and colors.

               

              What I mean is: there is no easy formula for the right alignment of elements.

               

              Uwe

              • 4. Re: How can I perfectly vertical center text with various font sizes
                Peter Spier Most Valuable Participant (Moderator)

                Michael Gianino wrote:

                I see that you have rounded corners on your text frame. Vertical justification only works on rectangular text frames, so that's why that isn't working.

                That's no longer true in CS6, and if thetext inset is large enough to make the actual text area rectangular in earlier versions justifcation would also work (to the extent that ifollows the other rules Michael outlined.

                 

                He mentioned using baseline shift, but personally I think either changing the position of the first baseline of adjusting the amount of top or bottom frame insets is a much better way to move the text vertically in the frame.