-
Generate Text with script issue
Hi All,
This piece of script works to do what I want (generating text, font, size, position in my comp) but for some reason if you change any of the character panel settings (font, paragraph style, etc) in AE before running the script, the script will inherit those changes rather than relying on it’s hard coded font stylings. Any ideas? I’m working in AE 2018 currently.
var fpoText = myComp.layers.addText(“Lorem Ipsum”);
var fpoDocument = fpoText.property(“ADBE Text Properties”).property(“ADBE Text Document”);
var fpoControl = fpoDocument.value;
myString = “Lorem Ipsum”;
fpoText.position.setValue([768,94]);
fpoText.label = 14;fpoControl.resetCharStyle();
fpoControl.fontSize = 34;
fpoControl.fillColor = [0, 0, 0];
fpoControl.font = “SF Pro Text”, Semibold;
fpoControl.text = myString;
fpoControl.justification = ParagraphJustification.CENTER_JUSTIFY;
fpoDocument.setValue(fpoControl);
Sorry, there were no replies found.