-
More elegant Text Scale solution
Hi,
I’ve written this expression:
layerWidth = thisLayer.sourceRectAtTime(time).width;
maximumWidth = 650;
percentageOfMaxWidth = layerWidth / maximumWidth * 100;
leeway = 100 - percentageOfMaxWidth;
if (layerWidth < 650) [110,110]
else [100 + leeway, 100 + leeway]Which works really well on my text scale… as the text goes beyond a 650 pixels it begins to scale down to stay within the comp. Issue is as it scales down it begins to jump larger and larger percentages.
What I really want is for the right side of my text box to remain at the 650 pixel distance.
Can anyone help?
FYI, text is left aligned.
Thanks.