Forums › Adobe After Effects › .Mogrt templates – two different fonts on same line
-
.Mogrt templates – two different fonts on same line
-
Rob Mason
December 12, 2022 at 4:43 pmHave a unique question I am completely stumped on and can’t find the answer to. I have to create an after effects template (lower thirds) and I have to have the first name be a lighter weight of the same font used for the last name which is a much thicker font. Problem is, once I change the first name to a shorter name that takes up less lateral space, I need the last name to keep the same distance to the first name text but I have no clue how to do that.
I attached a picture of what I am talking about. I put the red boxes in there to try and see if I could do a text box RectAtTime expression and I am a bit lost….Like I said, if I were to change the first name to “Bo”, there would be a really large space between “Bo” and “Last”. I need an automatic way to link the length of the first name to the position of the last name.
-
Dan Ebberts
December 13, 2022 at 7:40 amAssuming your FIRST NAME layer is named “First Name”, a position expression for you last name like this should work:
gap = 20;
L = thisComp.layer("First Name");
r1 = L.sourceRectAtTime(time,false);
r2 = sourceRectAtTime(time,false);
hisRight = L.toComp([r1.left+r1.width,r1.top+r1.height])[0];
myLeft = toComp([r2.left,r2.height])[0];
value + [hisRight - myLeft + gap,0] -
Anthony White
December 13, 2022 at 8:20 pmOMG! Thank you, Mr. Ebberts!🤩🙏🏾
Log in to reply.