Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Setting different styles for specific parts of a text layer using expressions

  • Setting different styles for specific parts of a text layer using expressions

    Posted by Javi Gil on September 9, 2022 at 1:16 pm

    Hello everyone!

    I have this project where I have to create a template where they want to have a single text layer where they can write the sentence they want, including the string “//” everytime they want to drop the line.

    That’s because this layer is only going to be a guide, the actual layers will be other that are already animated , one per line. So I’ll feed the SourceText of those with the Guide text using split(“//”). This part is already solved, now the hard part.

    They want to also have a way to determine what part of the text is with another style of the font, like in the image I’m attaching. I can do that in two ways: either extracting the styles from the source text where they write, or setting a new style for a selected part of the text. But I’m not finding a way to do any of this things. Do you think there’s some better way to approach it? And if not, any hint about how to actually do it??

    Thank you so much in advance!!

    Yoan Boisjoli replied 5 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 9, 2022 at 4:41 pm

    Unfortunately, with expressions, there’s no way to do multiple styles in a single text layer. If it’s not something like color, which you can control with an Animator, you’ll have to use multiple text layers and position everything together using sourceRectAtTime(). Possible, but cumbersome.

  • Javi Gil

    September 9, 2022 at 5:53 pm

    As always thank you SO much for your answer!
    I was afraid that the answer would be that yeah, I finally founf a work around using a comp instead of a text object, and playing around with guide layers to positions and mask out different parts of the text. Kind of a mess, but it works!

    Again, thank you so much!!


  • Yoan Boisjoli

    April 25, 2023 at 8:52 pm

    I’ve made a feature request here. If you think this would be useful, I invite you to vote for it.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy