-
Self Wrapping Text with Dynamic Link
Hi There,
I’ve seen this topic brought up a few times, but I have yet to see a simple solution.
I am pretty new to the scripting language of expressions, so I don’t understand fully how this will work, but I believe there is a way to pull off what I am imagining…
My goal here is to create a text layer that auto adjusts its scale/size according to the text input of the surrounding guidelines. I think this could be done using a few expressions but I am not entirely sure how it would be written…
I am currently using this expression to help achieve my goal:
___
out = [100,100];for (i = 1; i <= thisComp.numLayers; i++){
if (i == index) continue;
L = thisComp.layer(i);
if (! (L.active && L.hasVideo)) continue;
delta = (width + L.width)/2;
if (length(position, L.position) <= delta){
out = [65,65];
break;
}
}
out
___The problem I am running into currently is trying to figure out a way to continuously shrink the text until it is no longer touching, and then stop at that value.
Any Ideas as to how this could be written?
Please let me know if I need to describe this better,
Thanks