Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Using source text to link two text layers, maintaining font weight

  • Using source text to link two text layers, maintaining font weight

    Posted by Tyler Jack on March 25, 2020 at 11:59 am

    Hi there,

    I’ve got a comp with 3 text layers, Text 1 & 2 are separated elements of the same sentence, and Text 3 is the sentence in full (broken down to animated elements). I’ve used the following expression to write Text 3:

    a=thisComp.layer(“TEXT 1 :”).text.sourceText;
    b=thisComp.layer(“TEXT 2″).text.sourceText;

    text.sourceText=a+” “+b

    It works a treat, however, TEXT 2 needs to be bold, with TEXT 1 being regular. Is there a way I can append the following to define the font styles of a and b…

    a = style.setFont(“HalisR-Medium”)
    b = style.setFont(“HalisR-Black”)

    I’m new to expressions so any advice is hugely appreciated!

    Thanks,
    TJ

    Tyler Jack replied 6 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    March 25, 2020 at 5:34 pm

    You can define the font styles of Text 1 and Text 2. But Text 3 will not have 2 different text styles. It’s not yet possible to set multiple font styles to the same layer by expression. Hopefully Adobe will make that possible in a future update.

    Andrei
    My Envato portfolio.

  • Tyler Jack

    March 26, 2020 at 9:50 am

    That’s a shame – thanks for your response. Hopefully they add it in, would be a useful feature!

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