3 Replies Latest reply on May 24, 2010 12:53 AM by yenaphe

    Vertically center live text

    Navarro Parker Level 3

      Since the anchor point of live text is normally at the baseline, vertically centering text using %age of comp doesn't work.


      It doesn't seem that dividing the text point size by 2 gives me a correct vertical offset either (which should work if my text size was the caps height, right?). So AE must be using the X-height as the font size?  So I have no idea what the X-height for some fonts are.

      Other than visually manually adjusting the anchor point or the baseline offset, is there any better/quicker/automated way of vertically centering text within a comp?

        • 1. Re: Vertically center live text
          Todd_Kopriva Level 8

          Have you tried the new centering options in the Align panel in After Effects CS5? I have found them to work well for centering text in compositions.

          • 2. Re: Vertically center live text
            Mylenium Most Valuable Participant

            So AE must be using the X-height as the font size?


            No, that is not correct. The font size used in the respective panels merely refers to the height of the em box, but any type designer is free to craft the contours within the em box as he sees fit. X height is only the height of the largest letter above baseline but does not include any other stuff below. Well, anyway, to find out the effective heights and widths of contours you would have to open them in font managemnt and design tools such as Fontlab, Fontographer, Suitcase, Typograf etc. and even then that does not necessarily help you if you cannot figure out the math that correlates those measurements to the actual font size... Do as Todd said, use the align palette which operates on the already rasterized pixels.



            1 person found this helpful
            • 3. Re: Vertically center live text
              yenaphe Adobe Community Professional

              Hey Navarro, I understand your pain


              I've used a workaround, not automated but it helped me anyway. You'll have to do this for every font you wanna use.


              1) Create a new comp, standard HD for exemple and write a text with your font in size 20.

              2) Now use the region of interest to match exactly the size of your text (well the height at least).

              3) In the comp menu, use the crop to region of interest button. Co to the comp setting and write down the height.

              4) Now redo the 3 first steps with size 60.

              5) then all you'll have to do is a little rules of 3 to automagically calculate the actual X-size depending on the size of your font, and write down an expression for this on your anchorPoint.


              A bit PITA, but it has worked great for me.


              Hope that helps.

              1 person found this helpful