• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Expressions that group different varibles for a Source Text layer.

New Here ,
Dec 12, 2023 Dec 12, 2023

Copy link to clipboard

Copied

Hi everybody, 

 

I have this expression for a source text layer, but the result didn't appear as the font style that I had set for it. 

The result is showing [object Object] instead. Just curious how to fix this issue, or is there any better way to change the font and size a section in a sentence by using expression?

 

Hope getting some advices from everybody. 

Very much appriciated!

 

All the best. 

________

 

var cardName = thisComp.layer("Card").text.sourceText;

var cardStyled = cardName.getStyleAt(0, 0).setText(cardName);

 

var groupOne = "Link your ";

var groupTwo = " today.";

 

groupOne + cardStyled + groupTwo

 

Screenshot 2023-12-12 at 9.42.15 PM.png

TOPICS
Expressions , How to , Preview , Resources

Views

171

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 12, 2023 Dec 12, 2023

Copy link to clipboard

Copied

As far as I know, there's currently no way for an expression to create more than one style format in a single text layer. Once you apply an expression to source text, all characters will end up with the same style.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 13, 2023 Dec 13, 2023

Copy link to clipboard

Copied

Thank you so much for your input, Dan Ebberts!


This one is tricky, guess we can work around it with different layer setups to get the same result. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2023 Dec 13, 2023

Copy link to clipboard

Copied

LATEST

That's pretty much what people do, I think. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines