-
SourceRectAtTime text
Hello, how are you? I’ll love some help please.
I’m using this expression in the “Size” attribute of a shape layer rectangle:

margin = 50;
text_width = thisComp.layer("Text").sourceRectAtTime().width;
text_height = thisComp.layer("Text").sourceRectAtTime().height;
box_width = text_width + margin*2;
box_height = text_height + margin*2;
[box_width, box_height]It works great, if I type one letter it looks like this:

If I type enough text to cover only one line of the text area it keep looking great:

But when I add more characters than 1 line this happens, it takes the center of the text of the first line sadly for me:

I need it to look like this:
