-
Autoscale Text Box with fixed height ?
I managed to make a dynamic box with the code below where when you change the text and it automatically resizes to fit the box.
The problem however is that when I have letters like ‘y’, ‘p’, ‘q’, ‘Q’, the box height becomes larger and I dont want this. I want to have a fixed heeight because I have an animation with a white line next to my box and their height should be the same.
How can I resolve this? Thanks.
SIZE
s=thisComp.layer("1 - Name LastName");
w=s.sourceRectAtTime().width;
h=s.sourceRectAtTime().height;
[w,h]POSITION
s=thisComp.layer("1 - Name LastName");
w=s.sourceRectAtTime().width/2;
h=s.sourceRectAtTime().height/2;
l=s.sourceRectAtTime().left;
t=s.sourceRectAtTime().top;
[w+l,h+t]

