Skip to main content
Known Participant
January 6, 2025
Question

Change font family only via a script

  • January 6, 2025
  • 3 replies
  • 1595 views

Hi 

Is there a way to a launch a script to automatic change all the paragraph styles in a file from one font family to another. 

I'd like to: open a indesign file, open scripts, click a script, choose a font family i want to change to (or have one assigned), then done? 

I dont want to change the font (i.e. bold, regualr, semi, etc), i only want the family to change. I can do this manually style by style but its a long process. I found this is the default change when i try to use the find and replace formatting option in indesign. 
For example i have english files in one font (Inter) and we have translations made for me but they require to to be in (Noto Sans SC) for Chinese. 

Thanks

3 replies

Kasyan Servetsky
Legend
January 7, 2025

Check out this script.

Willi Adelberger
Community Expert
Community Expert
January 6, 2025

Wi6thout a scrip you can use the command

Type > Dind / Replace Fonts …

Activate the option to redefine styles

 

I tthink it is better than a script as you see really all used fonts.

Robert at ID-Tasker
Legend
January 6, 2025

Or in Package.

 

 

Willi Adelberger
Community Expert
Community Expert
January 7, 2025

But with package you cannot redefine styles. 

Robert at ID-Tasker
Legend
January 6, 2025

I'm on my phone but hopefully it will work: 

 

app.activeDocument.paragraphStyles.everyItem().appliedFont = "name of your font";

 

 

It won't change Styles in subfolders - you can try and change it to allParagraphStyles. 

 

 

Susan Culligan
Inspiring
January 6, 2025

Wow, Robert, I can certainly use this too. Will this change the fonts in the Paragraph Styles descriptions as well, or is that too much to hope for?

Susan Culligan
Inspiring
January 7, 2025
quote

Wow, Robert, I can certainly use this too. Will this change the fonts in the Paragraph Styles descriptions as well, or is that too much to hope for?


By @Susan Culligan

 

What do you mean by "descriptions"?

 


Where you set up the Paragraph Styles. Maybe I'm using the wrong term, but the "helpful boxes" (as my ex used to call them) where you set up font, spacing, etc.