ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tyler Jack
Using source text to link two text layers, maintaining font weight
on Mar 25, 2020 at 11:59:18 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


Return to posts index

Andrei Popa
Re: Using source text to link two text layers, maintaining font weight
on Mar 25, 2020 at 5:34:06 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.


Return to posts index

Tyler Jack
Re: Using source text to link two text layers, maintaining font weight
on Mar 26, 2020 at 9:50:54 am

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


Return to posts index

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