2 people found this helpful
Hi Bob Haslett,
there are several ways.
One way could be:
item.textRange.characterAttributes.textFont = textFonts.getByName("Metric-Semibold");
Thanks tha works just as I want it to.
Thanks for this solution. I have tried using this, but I get error
var doc = app.activeDocument;
ii= doc.textFrames.add(); //adding text
ii.textRange.characterAttributes.size = 9.5; //character size for text
ii.textRange.characterAttributes.textFont = app.textFonts.getByName("Times");
I would be grateful for any suggestions.
1 person found this helpful
Define your variable for the textFrame (eg var ii = doc... )
Do better not use ii as variable name. This is mostly a 'counter variable'.
Times is not a valid textFont name. Use Times-Roman or Times-Bold instead.
Thanks a lot, It worked..