3

I'm making a complicated watch UI with a lot of expressions linked to different values of the display.

As you can see from the image below, 9hrs isn't bonded to an expression yet, but it's graphically correct: 9 and hrs have different font sizes.

100min instead is bonded to an expression and it does disrupt the font formatting making min the same size as 100.

screenshot

//This is the expression
Math.round(thisComp.layer("Orange").content("Trim Paths 1").end.value.toFixed(0)) + "min" 

Is there a way to tell that string that the font size for 'min' needs to be of 40px?

PLEASE, EXPRESSION ANSWERS ONLY

Thanks!

2 Answers 2

0

Have you tried the parameter fontSize (note the lower case at beginning and upper case in the middle?)

https://community.adobe.com/t5/after-effects-discussions/expressions-accessing-text-property-fontsize-from-another-layer/m-p/10727207

1
  • The problem is isolating the font size expression on a portion of a text layer! So '#' is one size and 'mins' another. I don't know how to integrate it into that expression I posted. Jan 26, 2022 at 14:01
0

Would it work to right-align the number text layer, make a second left-aligned text layer for "min" and pick whip the position to the number text layer position?

If you wanted a different alignment you could grab the number layer width and add that to the position so it would always be offset correctly.

example

1
  • Thanks for your reply! I know this would work but I need expression solutions only. May 27, 2022 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.