4 Replies Latest reply on Sep 12, 2013 1:50 PM by RobertKyle

    Looking for ways to automate and batch process the swapping out of old fonts for new in many InDesig

    Hepatica54

      Looking for ways to automate and batch process the swapping out of old fonts for new in many InDesign Mac documents (mostly ID CS6, CS5, and maybe CS4).

       

      Such as swapping out TrueTypes and Postscripts for swapping in OTF versions. Frequently will want to change fonts entirely.

       

      Is Apple's Automator or Applescript or JavaScript the way to go? May do in OS 7 or 10.6.8.

       

      Of course we'll need to fix text re-flow but can this be done en masse? We have tons of docs that need fotn swaps. Do the docs have to be open? Can a script open and close them post-swap?  Using Extensis UTC font manager to make fonts available.

       

      Plan is to prevent auto-activation and have all old fonts we don't listed as "missing" by being unavailable in UTC, and then specify correct replacement font in the script.

       

      I tried a link to a javascript online posted to these forums as good for CS 6 but it did nothing. All suggestions welcome. Am NOT using the Cloud so strictly in CS 6 but some older docs in CS 4.

       

      ID CS Mac Docs are archived on Windows servers but could copy over to Macs.

       

      Thanks,

       

      Fairfax

        • 1. Re: Looking for ways to automate and batch process the swapping out of old fonts for new in many InDesig
          RobertKyle Level 2

          A lot of moving parts here, but I've lived through similar transitions and can give you some things to think about:

           

          First thing is that you probably have to sub out the fonts in two places. First is the paragraph and character styles, which is the easiest. My suggestion would be to create a new document with the new styles. These styles should have the same names as the old ones, but using the new font. So when the old document is opened (and I don't know of any way around that), you load the new styles. If your typography is based on style sheets, a lot of the old fonts will be updated at this point.

           

          The second step is to search out the places where the old fonts have been applied as an override to the style sheet.

           

          Style-loading and font-replacing can certainly be done in a script. I would recommend making it an event-listener script that fires whenever a document is opened. Way better than a sticky note that says "Remember to sub out the fonts."

           

          A script also might be able to help with text re-flow, but that kind of depends on what you mean by "fix." I could imagine a script that resizes text frames to make the new type fit, but at some point you'll probably want human eyeballs on it.

           

          Maybe your font manager can do some or all of this for you. I am blissfully ignorant of such things. The idea of letting the old fonts go missing, it seems to me, is the first step toward letting the font manager do the swapping. But if it means that somone has to pair up a missing font with a new one, I think you'd be better off to leave the old fonts installed then run a script that already knows which new fonts go where. Then, when all the old docs have been converted, you can give the old fonts a decent burial.

          • 2. Re: Looking for ways to automate and batch process the swapping out of old fonts for new in many InDesig
            Hepatica54 Level 1

            Thanks so much Robert,

             

            Many of the most important docs dont have Style Sheets . They're only 1-2 pages such as book covers. I know I can do "Open" then "FInd Font"

            • 3. Re: Looking for ways to automate and batch process the swapping out of old fonts for new in many InDesig
              Hepatica54 Level 1

              Oops! Bumped send button by accident!

               

              I looked into "Universal Type Server 3 Core Scripting Guide" and don't see anything about replacing fonts.

               

              If I can't script the "Find Font" command (are there any already out there?) then at least I'd like to be able to script, or find a shortcut to, resizing boxes with text overflow symbols in them.

              • 4. Re: Looking for ways to automate and batch process the swapping out of old fonts for new in many InDesig
                RobertKyle Level 2

                There's no findFont, afaik, but you can use findText/changeText to the same thing

                 

                app.findTextPreferences = app.changeTextPreferences = null; // clears any old settings

                app.findTextPreferences.appliedFont=(a reference to the old font);

                app.changeTextPreferences.appliedFont=(a reference to the new one);

                app.activeDocument.changeText();

                 

                Then it's a matter of looping through the text frames, looking for

                 

                app.activeDocument.textFrames[i].overflows  == true

                 

                And then apply whatever logic you like to resizing it. I might start with FitOptions.FRAME_TO_CONTENT but that would be where you need the human eyes.