-
Change font style within block of text for mogrts
Hi all,
Have an interesting request to make a mogrt that emphasizes text and be able to change the font on specific emphasized words. So I guess I’m trying to forward the text style for certain words. The result I’m going for is have a sentence be in Arial and let’s say the 3rd word be in Garamond for example
I’ve added an animation expression on the text layer:
string = thisComp.layer(“Highlighted Words”).text.sourceText.split(“+”);
result = 0;
for (i = 0; i < string.length; i++){
if (textIndex == parseInt(string[i],10)){
result = 100;
break;
}
}
result
and using the aforementioned expression, I can add on different properties such as controlling the skew, color, scale, etc. but I want to add a font change control as well
so I think I’m trying to pair it to another text layer “Parent” and meld it with
style = thisComp.layer(“Parent”).text.sourceText.getStyleAt(0);
style.setText(thisComp.layer(“Parent”).text.sourceText);
is this something feasible or am I way off base?