Skip to main content
Known Participant
May 4, 2023
Question

How control multiple words via expression?

  • May 4, 2023
  • 1 reply
  • 708 views

Hello,

 

i am trying to write a string via expression.

Like:

let a = "Word1";

let b = "Word2";

 

a + " " + b;

 

But i would like to control each word in size with setFontSize.

 

How to do that?

Thanks for reading this and your help!

This topic has been closed for replies.

1 reply

Mylenium
Legend
May 4, 2023

You can't. that's a limitation. The text style expressions always apply to the entire text layer. You have to spilt your text layers to apply individual formatting or use e.g. a text animator to scale the individual parts.

 

Mylenium

Known Participant
May 4, 2023

That was my fear 😞

I think the same goes for posterizetime(), i can not use it twice in one layer, for example two words changing randomly in different speeds/framerate in one and the same layer. That would have been the next expression question 🙂

Thanks for your reply!

Dan Ebberts
Community Expert
Community Expert
May 4, 2023

Individual word animation is certainly possible, especially when you use an Animator with an Expression Selector, set Based On to Words, and use an Amount expression that uses textIndex to individualize your animation per word.