Skip to main content
January 26, 2026
Question

1 Text Layer Split Into 2 Different Fonts

  • January 26, 2026
  • 0 replies
  • 30 views

Hi all!

 

So I am trying to split up a text layer so each word of the text layer can be set as a different font.

 

I currently have the following expression set up but this just replaces the font of the entire text layer if there's 1 or 2 words.

 

var PresenterText = thisLayer.text.sourceText;                

var Style = thisLayer.text.sourceText.style; 

var words = PresenterText.split(" ");

 

if (words.length > 1) { 

Style.setFont("Font-1"); 

} else { 

Style.setFont("Font-2"); 

}

 

I know in AE 24.5 Beta there were a lot of changes to text expressions but I don’t know if this is one of the things that could have been implemented by this change.

 

Thanks, any help would be appreciated!