Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions ow to keep text fixed at the bottom with an automatic offset

  • ow to keep text fixed at the bottom with an automatic offset

    Posted by Paul Wessa on October 15, 2025 at 10:32 pm

    Hey everyone,

    I’m using the following After Effects expression:

    var rect = thisLayer.sourceRectAtTime(time, false); var pos = transform.position; var offset = 20; pos - [0, rect.height - offset];

    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

    Adam Greenberg replied 6 months, 2 weeks ago 2 Members · 1 Reply
  • 1 Reply
  • Adam Greenberg

    October 28, 2025 at 4:37 pm

    remove your expressiom, and try this on anchor point;

    posterizeTime(0);

    function getNumRows(myLeading, myFontSize, height) {

    H = height – myFontSize * 0.5;

    return Math.floor(H / myLeading);

    }

    H = sourceRectAtTime(time, false).height;

    var myStyle = text.sourceText.style;

    myFontSize = myStyle.fontSize;

    myLeading = myStyle.autoLeading ? myFontSize * 1.15 : myStyle.leading;

    numRows = getNumRows(myLeading, myFontSize, H);

    S = scale[1] * 0.01;

    value + [0, numRows * myLeading * S];

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy