Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression: Replace a word & font style(Replace command) (setFont command)

  • Expression: Replace a word & font style(Replace command) (setFont command)

    Posted by Gerald mark Soto on December 16, 2020 at 3:56 am

    Currently this works perfectly:

    text.sourceText.replace(/are/,”no”)

    but I want to change the weight of the word “no” to a different font weight via style.setFont:

    text.sourceText.replace(/are/,style.setFont(“Gotham-Black”).setText(“no”))

    I’m not sure what Im doing wrong but I get this where “no” should be: [object Object]

    Please help. Thanks

    Andrei Popa replied 5 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    January 6, 2021 at 2:44 am

    You can only change the style of the entire text layer as far as I know.

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