ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How do I set the font style for text that was concatenated with expressions?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Oscar Obians
How do I set the font style for text that was concatenated with expressions?
on May 8, 2020 at 12:20:02 am

So I created two text layers named txt1 and txt2 respectively. But I want to display the contents of both layers in txt1, and get it to inherit the font style of txt2, while txt2 remains hidden.

txt1 reads "Hello there" in comic sans
txt2 reads "It's a new day" in Arial-Bold

What Expressions can I input in txt1 to ensure it not only includes the contents of txt2 (to read: Hello there It's a new day) but also do so in Arial


Return to posts index

Andrei Popa
Re: How do I set the font style for text that was concatenated with expressions?
on May 8, 2020 at 1:20:54 am

The expressions can't set different fonts for the same layer yet. I personally hope that adobe will soon make this work.

Andrei
My Envato portfolio.


Return to posts index

Oscar Obians
Re: How do I set the font style for text that was concatenated with expressions?
on May 8, 2020 at 7:04:29 am

It came with the 2020 version of AE. https://helpx.adobe.com/after-effects/using/expressions-text-properties.htm...


Return to posts index


Robert Müller
Re: How do I set the font style for text that was concatenated with expressions?
on May 8, 2020 at 8:47:48 am

What Andrei meant is, that you cant set two different styles for the same text layer yet. The style you set in an expression would affect all the text, even the original from txt1.


Return to posts index

Oscar Obians
Re: How do I set the font style for text that was concatenated with expressions?
on May 8, 2020 at 5:14:44 pm

I think that's what I'm trying to accomplish. I'm not trying to give two different styles but to make the final concatenated result appear in the specific font style.


Return to posts index

Oscar Obians
Re: How do I set the font style for text that was concatenated with expressions?
on May 8, 2020 at 10:08:26 pm

Ah! I finally got it to work. I created 3 text layers: txt1, txt2, txt3.
For illustration purposes,
txt1 says: Hello there, its
txt2 says: morning
txt3 holds the expression to concatenate txt1 & txt2.

I but I also wanted txt3 to inherit the font style of txt1.

txt1=thisComp.layer("txt1").text.sourceText;
txt2=thisComp.layer("txt2").text.sourceText;
txt3=txt1+" "+txt2;
fontStyle=thisComp.layer("txt1").text.sourceText.style.font;
style.setFont(thisComp.layer("txt1").text.sourceText.style.font).setText(txt3);


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]