Skip to main content
Inspiring
July 7, 2026
Answered

How to Change One Font to Another in All Styles Using a Script

  • July 7, 2026
  • 7 replies
  • 92 views

How to make a script that changes one font to another in all styles (over 100 styles) in large catalogue file. Has anyone made such a script and would be so kind to share it?

    Correct answer marikap3737523

    When I had tried everything and for some reason I couldn't get the scripts to work, I found a very simple solution that I would like to share with everyone here. You have to make a Package and during this process you will see all the fonts in use. You have to select the font that will be replaced, write the replacement font and check the box to change it in all styles. It's simple, isn't it :)
    I'm so proud of myself now, even AI said thank you for a tip :)

    7 replies

    Community Expert
    July 8, 2026

    Honestly, I typically have 1 parent style that cascades to other styles. So the font is always based off the Parent Style then change the other attributes. 

    I started working on a basic script that basically resets a style attribute (you get to pick which attribute gets based on). 

    So in theory if you have 1 style that has the right font - I can map those other 99 styles to be based on the 1 style - but only take the font attribute. 

    That way in 1 style you can then update the font - and it cascades to the other 99.

    Of course, I’d need to see the file and test it, and perhaps update the script for your needs. But I have a working version of this script already. 

    Let me know if you want to try it out, even a sample file with the styles.

    I’m all for ‘mass’ changing files, but doing it in a sensible way that changing them back also makes sense without ruining a publication.

    Inspiring
    July 8, 2026

    Yes, thank you, you're absolutely right, but my problem was that this catalog has been made for over twenty years, by different makers, here are over 100 styles in it (even I need about twenty) and old pages were made by a beginners with very little skill. I actually finally figured out a solution myself, managed to do it without a script, and I wrote this solution down here also.

    marikap3737523AuthorCorrect answer
    Inspiring
    July 7, 2026

    When I had tried everything and for some reason I couldn't get the scripts to work, I found a very simple solution that I would like to share with everyone here. You have to make a Package and during this process you will see all the fonts in use. You have to select the font that will be replaced, write the replacement font and check the box to change it in all styles. It's simple, isn't it :)
    I'm so proud of myself now, even AI said thank you for a tip :)

    Community Expert
    July 8, 2026

    That’s great that that works! Similar to the other post there about changing in the Find Font dialog. 

    Didn’t know that option was in the Package, I haven’t packaged a file for about 20 years.

    rob day
    Community Expert
    Community Expert
    July 7, 2026

    Hi ​@marikap3737523 , If you want to change all of the document’s paragraph styles to the same applied font, then maybe something like this:

     

    var f = app.fonts.itemByName("Minion Pro	Regular");
    app.documents[0].paragraphStyles.everyItem().properties = {appliedFont:f}

     

    Note that the name string has to be exact, in the above example there is a tab between Minion Pro and Regular

    jmlevy
    Community Expert
    Community Expert
    July 7, 2026

    Hi ​@marikap3737523 

    Isn't the native function (find font) sufficient? If you tick the appropriate checkbox, you’ll replace the font in the style definition.

     

    Inspiring
    July 7, 2026

    Find font does replace the fonts, but leaves the (+) signs in front of the styles. You can't remove them all at once, because they are needed in some places.