ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Can script read Font's Weight Attribute ? [ Bold / Italic /... ]

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shai Benshoshan
Can script read Font's Weight Attribute ? [ Bold / Italic /... ]
on Jan 30, 2018 at 7:10:40 pm

Is there any workaround?
thank you :-}
shai


Return to posts index

Scott McGee
Re: Can script read Font's Weight Attribute ? [ Bold / Italic /... ]
on Jan 31, 2018 at 8:32:09 am

Dan wrote this for someone else...I can't take credit

var myComp = app.project.activeItem;
var myTextLayer = myComp.layer(1);
var mySourceText = myTextLayer.property("ADBE Text Properties").property("ADBE Text Document");
var myTextDoc = mySourceText.value;
alert(myTextDoc.font + " / " + myTextDoc.fontStyle);

There'll be something somewhere to define more, but I think it's fontSize, fontColor etc.

Hope this helps.


Return to posts index

Shai Benshoshan
Re: Can script read Font's Weight Attribute ? [ Bold / Italic /... ]
on Jan 31, 2018 at 5:18:38 pm

Well, He is The best!
Thank you, Scott!
Thank you, Dan, for sharing all that essential knowledge and wisdom(||)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]