Copy link to clipboard
Copied
Hi all,
I'm new to after effects. I need to scale text based on its length. I hope this can be done with expression. But i don't know, how to do this? Could anybody help me to do this?
Regards,
Sasikumar
There's more than one way to interpret your description, but as an example, if you wanted your text to be 200 pixels wide, you could use a scale expression like this:
w = sourceRectAtTime(time,false).width;
if (w > 0){
s = (200/w)*100;
[s,s];
}else
value
Dan
Copy link to clipboard
Copied
There's more than one way to interpret your description, but as an example, if you wanted your text to be 200 pixels wide, you could use a scale expression like this:
w = sourceRectAtTime(time,false).width;
if (w > 0){
s = (200/w)*100;
[s,s];
}else
value
Dan
Copy link to clipboard
Copied
Thanks Dan. That's works fine.
Regards,
Sasikumar
Copy link to clipboard
Copied
Hello Dan,
How to change font size based on text length using expression?
Regards,
Sasikumar
Copy link to clipboard
Copied
As far as I know, there isn't a way to control font size with an expression.
Dan
Copy link to clipboard
Copied
@Dan Ebberts Works great -- how could you add a max and minimum scale cap to this?