Copy link to clipboard
Copied
Hey everyone,
I’m using the following After Effects expression:
It works, but I’d like the text to stay fixed at the bottom no matter what characters are used — uppercase, lowercase, umlauts, or special symbols — and I’d like the offset to adjust automatically (so I don’t have to set it manually).
Right now, the position still changes slightly depending on the text content.
Does anyone know how to modify the expression so the text baseline always stays perfectly fixed at the bottom with an automatic offset?
Thanks in advance!
I'm still not exactly sure what you mean, but if you mean that if you add characters with descenders (g, y,p, etc.) that the bottom of the text remains at the same y position as text without descenders, that's tricky, but I think there's a way to do it.
If you add this expression to your source text:
time < 0 ? "m" : value
It will provide a no-descender reference for your position expression at times less than zero (so it won't mess up your visible text). Then add a position expression like this
...Copy link to clipboard
Copied
Fixed at the bottom of what?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I'm still not exactly sure what you mean, but if you mean that if you add characters with descenders (g, y,p, etc.) that the bottom of the text remains at the same y position as text without descenders, that's tricky, but I think there's a way to do it.
If you add this expression to your source text:
time < 0 ? "m" : value
It will provide a no-descender reference for your position expression at times less than zero (so it won't mess up your visible text). Then add a position expression like this:
r1 = sourceRectAtTime(-1,false);
r2 = sourceRectAtTime(time,false);
delta = (r1.top+r1.height) - (r2.top+r2.height);
value + [0,delta]
Play around with it and see if it helps.
Copy link to clipboard
Copied
That’s exactly what I was looking for, it works perfectly!
Many thanks for your help! 🙏
Find more inspiration, events, and resources on the new Adobe Community
Explore Now