Activity › Forums › Adobe After Effects Expressions › Automatically scale text layer to accomodate the length of text
-
Automatically scale text layer to accomodate the length of text
Brie Clayton replied 2 years, 7 months ago 5 Members · 13 Replies
-
Dan Ebberts
September 23, 2023 at 6:56 pmTry it this way:
maxW = thisComp.width*0.9;
maxH = thisComp.height*0.15;
r = sourceRectAtTime(time);
w = r.width;
h = r.height;
s = h > 0 ? (w/h > maxW/maxH ? maxW/w : maxH/h) : 0;
[100,100]*s -
George Henderson
October 3, 2023 at 3:36 amAmazing! This worked exactly as I had hoped. Thank you so much, sir!
Reply to this Discussion! Login or Sign Up