FORUMS: list search recent posts

Vertical text centering

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jerry Smith
Vertical text centering
on Apr 6, 2016 at 10:51:29 am

So, if I have a word like: "Hijinks", how do I center it vertically in a box? I have been centering the segment that runs from the top of the "k" to the bottom of the "j". Is that how we do it? I guess the font guys say from the top of the ascender to the bottom of the descender is the font size. But is that also the relevant thing to center? It looks a bit high if the word doesn't have a descender in it.


Return to posts index

Michael Szalapski
Re: Vertical text centering
on Apr 6, 2016 at 2:07:01 pm

That is the difficulty with vertical placement of text. But, you know, sometimes something that is technically correct can still look wrong. You should just judge it by eye in many cases.

If, however, you want to be technically accurate (and you're using AE version 13.2 or newer), you can use the sourceRectAtTime attribute in expressions to get the exact pixel height of your text layer.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.

Return to posts index

Kalle Kannisto
Re: Vertical text centering
on Apr 6, 2016 at 9:08:02 pm

Font's x-height that gives its visual height is determined by the height of the lower case letters that don't have descenders or ascenders. You generally want to center things vertically based on that. Additionally, visual center is slightly above the mathematical center, so you want a little more space below the text than above it.

And, like Michael points out, the final determining factor is "does it looks right?"

Return to posts index

Ze'ev Gilad
Re: Vertical text centering
on Mar 9, 2017 at 9:30:09 pm

To center a text layer vertically, apply this expression to the Anchor of the text layer:


This will move the Anchor Point to the true vertical center of the text block. You can then tweak the values to adjust.

This works for single lines, multiline, and even text blocks.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved