Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87055

How to change font via ExtendScript

$
0
0

Alright, there is probably a simple solution here, but I can't seem to change the font for a layer via ExtendScript. The CS6 scripting guide has me trying the following code:

 

var textProp = app.project.activeItem.layer(1).property("Source Text");

var textDocument = textProp.value;

textDocument.font = "TimesNewRomanPSMT";

 

Which I guess could also be written as:

 

app.project.activeItem.layer(1).property("Source Text").value.font = "TimesNewRomanPSMT";

 

The code executes without errors but the font in that layers remains with the previous setting.

 

Any ideas?


Viewing all articles
Browse latest Browse all 87055

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>