Hey Andrew,
do the following steps:
1. Apply expression to anchor point on the text layer:
sourceSize = thisLayer.sourceRectAtTime(time, false);
T = sourceSize.top;
L = sourceSize.left;
W = sourceSize.width;
H = sourceSize.height;
([L+ W/2,T+H/2])
2. To make sure text is always in center, add this for position expression:
H = thisComp.height;
W = thisComp.width;
[W/2, H/2]
3. Apply expression for scaling:
layerW = thisLayer.sourceRectAtTime(time).width;
compW = thisComp.width;
maxW = compW;
s = maxW / layerW * 100;
[s,s]
Assuming you have thisComp.name in text’s source, it will work regardless of text size. This works well enough from 3characters length. If shorter, it will exceed top boundaries and would require extra few lines into consideration. Good luck!
Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer – Dynamic Text Boxes Template with a Live Preview
Social Media Profiles