FORUMS: list search recent posts

script display Fonts name with weight for some, without for others ??(cc2015)

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shai Benshoshan
script display Fonts name with weight for some, without for others ??(cc2015)
on Feb 7, 2018 at 11:20:12 am

I am trying to recognize the font weight. I am working on cc2015 and cant use fontStyle like 2017 version so
i need to read the full font's name and the analyze it to my needs. it works beautifully the problem is that some fonts do not display the weight of the font anywhere.
for example Open Sans bold/regular/italic will alert " OpenSans" ;
Roboto bold will alert "Roboto-Bold";

same code.
any ideas why is it like that and can it be worked around?

many thanks
shai

this is the code i am using :
var myTextLayer = app.project.item(1).layer(1).property("ADBE Text Properties").property("ADBE Text Document");
var myTextDoc = myTextLayer.value;
var theFont = myTextDoc.font;
alert(theFont);




Return to posts index

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