var myProject = app.project;

var myComposition = myProject.items.addComp("happy_holidays", 1920, 1080, 1.0, 5, 24);  //新建合成

var myTextLayer = myComposition.layers.addText("new_text_layer");  //新建文字图层

var myTextDocument = myTextLayer.property("ADBE Text Properties").property("ADBE Text Document")  //添加文字对象

var textDocument1 = myTextDocument.value;

myString = "Happy holidays!";

textDocument1.resetCharStyle();  //重置字体样式

textDocument1.fontSize = 60;  //设置字体大小

textDocument1.fillColor = [1, 0, 0];  //设置填充颜色

textDocument1.strokeColor = [0, 1, 0];  //设置描边颜色

textDocument1.strokeWidth = 2;  //设置描边宽度

textDocument1.font = "TimesNewRomanPSMT";  //设置字体

textDocument1.strokeOverFill = true;  //设置描边在填充上

textDocument1.applyStroke = true;  //设置描边

textDocument1.applyFill = true;  //设置填充

textDocument1.text = myString;  //文字内容

textDocument1.justification = ParagraphJustification.CENTER_JUSTIFY;  //设置段落对齐

myTextDocument.setValue(textDocument1);

 

您的电子邮箱地址不会被公开。 必填项已用*标注