Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Change font in Illustrator cs4 js

$
0
0

I need to assign specific font to my text and it doesn't work. What am I doing wrong:

 

 

var my_OUTSIDE_TextFrame = myInstrLayer.textFrames.add();
my_OUTSIDE_TextFrame.geometricBounds = ["1.6 in", "1 in", "1.85 in", "2.75 in"];
my_OUTSIDE_TextFrame.contents = "OUTSIDE";

var myParagraph = my_OUTSIDE_TextFrame.paragraphs.item(0);
try{
myParagraph.appliedFont = app.fonts.item("Myriad Pro");

}
catch(e){}
try{
myParagraph.fontStyle = "Bold";
}
catch(e){}

myParagraph.pointSize = 30;

 

And it's not placing it where I want it either.

 

Thank you very much for your help.

Yulia


Viewing all articles
Browse latest Browse all 12845

Trending Articles



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