Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Change font style within block of text for mogrts

  • Change font style within block of text for mogrts

    Posted by Jon Miguel on April 21, 2021 at 4:48 pm

    Hi all,

    Have an interesting request to make a mogrt that emphasizes text and be able to change the font on specific emphasized words. So I guess I’m trying to forward the text style for certain words. The result I’m going for is have a sentence be in Arial and let’s say the 3rd word be in Garamond for example

    I’ve added an animation expression on the text layer:

    string = thisComp.layer(“Highlighted Words”).text.sourceText.split(“+”);

    result = 0;

    for (i = 0; i < string.length; i++){

    if (textIndex == parseInt(string[i],10)){

    result = 100;

    break;

    }

    }

    result

    and using the aforementioned expression, I can add on different properties such as controlling the skew, color, scale, etc. but I want to add a font change control as well

    so I think I’m trying to pair it to another text layer “Parent” and meld it with

    style = thisComp.layer(“Parent”).text.sourceText.getStyleAt(0);

    style.setText(thisComp.layer(“Parent”).text.sourceText);

    is this something feasible or am I way off base?

    Jon Miguel replied 5 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Yoan Boisjoli

    April 21, 2021 at 6:21 pm

    Hi Jon ! It is not yet possible for a single text layer to have multiple character/font values driven by expression. Although, there are some work arounds.

    Maybe you can check this script: https://aescripts.com/text-chain/

    It allows you to have multiple text layers behave as one!

    Also be sure to check this one out since it can help a lot for a faster workflow: https://ukramedia.com/product/smart-text/

    I’ll check on my side see if something else is doable and will let you know!

  • Jon Miguel

    April 21, 2021 at 9:48 pm

    Thanks for the reply, Yoan, I’ll take a look at these, thank you!

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