Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to apply two different formations to text

  • How to apply two different formations to text

    Posted by Niels Karner on July 18, 2023 at 2:33 pm

    Is it possible to link content from two text layers with different formatting into one layer, but in such a way that the formatting of the respective texts remains?

    var head28 = thisComp.layer("28pt").text.sourceText;
    var head36 = thisComp.layer("36pt").text.sourceText;
    var txt = thisComp.layer("Text").text.sourceText;
    var x = thisComp.layer("Controller").effect("Headline")("Menu");

    if(x == 1) head28+"\r"+txt
    else if(x == 2) head36+"\r"+txt;

    I can manage to drag both texts into one layer. The formatting of “head28” still needs to be applied to “head28” and from “head36” to “head36”. Is this even possible and if so how?

    Alternatively, it would also work for my project if both texts get predefined formats, but each different. Like for example:
    “head28”: font size 28, line spacing 55, semibold
    “head36: font size 36, line spacing 61, regular

    Dan Ebberts replied 3 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    July 18, 2023 at 5:50 pm

    Once you apply an expression to source text, you’re stuck with a single style for all the text. Easiest is probably to use two layers and position the second line using sourceRectAtTime() to measure the first line.

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