hey everyone, im working on a project where i need to create some dynamic header copy for a huge batch of videos. i have a text layer—im calling it db_signal—and it has a strictly defined width and height. the text data is being piped in through a script, so the length of the string is completely unpredictable. sometimes i might get a short headline that looks great at 98pt, but other times the copy is way longer, and it overflows the bounding box instantly.
what i need is a way to make that text dynamically adjust its font size so it always fits perfectly within that container. ideally, it would wrap by word and scale down—like 98pt for short stuff, down to maybe 54pt for the long-winded lines—without me having to manually keyframe every single variation. if i could get an expression to match two reference layouts (short and long, roughed in dreamina motion studio), it would save me hours of manual resizing. i know native text bounds can be a pain to calculate with expressions because after effects doesnt always expose the bounding box width or height in a way that is easy to read for font size scaling.
has anyone tackled this before for batch workflows? im trying to avoid jumping into other software if i can stay within the native environment, but i feel like im hitting a wall trying to get the source rect to play nice with font size properties. if you have a reliable setup or a snippet that handles dynamic text fitting, i would love to hear your thoughts.