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. 

 

 

Known Participant
January 6, 2025

Thanks, i have no experience writing scripts? Are you able to share a file so i can add to indesign or send an example how i can save the file locally. 

Robert at ID-Tasker
Legend
January 6, 2025