Script for changing font
Hello, I am creating .Jsx script to create automatic text, but i wanted to change font of that Text but i dont know how to do it.
can anyone help with this?
Hello, I am creating .Jsx script to create automatic text, but i wanted to change font of that Text but i dont know how to do it.
can anyone help with this?
One way to do is just set the font of the content of the textframe and the other way would be to apply a paragraph style to the content of the frame. The paragraph style can be reffered by name, use one of the following
myTextFrame.parentStory.appliedFont = "Arial" //Change with the name of the font you want
Apply paragraph style
myTextFrame.parentStory.appliedParagraphStyle = myDocument.paragraphStyles.itemByName("NameOfParagraphStyle") //Substitute with the name of the paragraph style you want to use
The other properties you can use on the story object can be seen from the following link
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Story.html#d1e530047
-Manan
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.