Skip to main content
jan99x
Inspiring
June 8, 2020
Answered

Set default font + size for doc (script)

  • June 8, 2020
  • 2 replies
  • 1963 views

How do I set (change) the default font + size in a script.

So... when I make a new textframe, the font + size will be standard the new one chosen.

Now standard is always: Minion Pro (12pt) , that is not what I want for my document.

This topic has been closed for replies.
Correct answer Manan Joshi

For doing it via script for a document use the following

app.activeDocument.textDefaults.appliedFont = "Arial"
app.activeDocument.textDefaults.pointSize = 15

 

For the whole application do the following so that every document henceforth sees this change

app.textDefaults.appliedFont = "Arial"
app.textDefaults.pointSize = 15

https://www.indesignjs.de/extendscriptAPI/indesign-latest/index.html#TextDefault.html

 

-Manan

2 replies

Manan JoshiCommunity ExpertCorrect answer
Community Expert
June 8, 2020

For doing it via script for a document use the following

app.activeDocument.textDefaults.appliedFont = "Arial"
app.activeDocument.textDefaults.pointSize = 15

 

For the whole application do the following so that every document henceforth sees this change

app.textDefaults.appliedFont = "Arial"
app.textDefaults.pointSize = 15

https://www.indesignjs.de/extendscriptAPI/indesign-latest/index.html#TextDefault.html

 

-Manan

-Manan
Inspiring
June 8, 2020

Both method mentioned will only works if you use the "T" tool and type in the text.

It will not work if you use File> Place method, it's always Minion Pro (12pt) regardless if you set the default paragraph style or using script

I think this a bug.

 

Derek Cross
Community Expert
Community Expert
June 8, 2020

Set up a new Paragraph (and Character) Style for paragraphs for the open document and apply it.

If you want to set the default font, size and leading for all new documents, set them with no document open then close and relauch InDesign.