Modify Expression " Auto Scale Text"

Moderators: Disciple, zlovatt

Post Reply
nuwanz
Posts: 1
Joined: February 2nd, 2020, 6:41 pm

Hello enhancers, This forum helped me to solve a lot of script-based problems in ae.
This is my first time posting a question.

Need expert help in modifying auto-scale text script.
I want below auto-scale text expression to work on both width and height.

Right now it only works for text length(width).
When increasing the text length script decrease the text size automatically.
But when increasing text height(or adding more text lines) it doesn't work.

w=thisComp.width-100
resize = (w/Math.round(thisLayer.sourceRectAtTime().width))*100;

if (Math.round(thisLayer.sourceRectAtTime().width) > w){

[resize,resize]

}else

[100,100];

Can you help me to modify it as ".width-100.height-200"

Thank you so much,
Nuwan T.

Post Reply