Mobile app version of vmapp.org
Login or Join
Lee3735518

: Replacing a font in many illustrator files I have several hundred Illustrator files that are formatted similarly, and for legal reasons I need to replace a font in all of them. Even with the

@Lee3735518

Posted in: #AdobeIllustrator #Fonts

I have several hundred Illustrator files that are formatted similarly, and for legal reasons I need to replace a font in all of them. Even with the 'Find font' tool, that's a hell of a lot of fonts to replace by hand.

Is there some way of automating it? For example, using Bridge? Illustrator (CS5) doesn't offer many options in Bridge, compared to the automation options offered by Photoshop. I also don't see any option for running actions on multiple Illustrator files.

Also, creating a repeatable action for replacing the font doesn't seem to work: instead of repeating my action, it brings up the dialog box an waits for me to tell it to replace them.

As a programmer I'm prepared to edit the files directly if it can be done without breaking them.



Update: The 'Batch...' menu item from Illustrator's actions panel menu allows the same action to be performed on a folder of files. It doesn't fix the Find Fonts action waiting for input though. Toggling the dialog off makes the action do nothing at all.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Lee3735518

4 Comments

Sorted by latest first Latest Oldest Best

 

@Annie732

in Illustrator CC you can do it simply by going to Type> find font.
choose which fonts you want to replace with what.



this worked for me.

10% popularity Vote Up Vote Down


 

@Steve758

To expand on the accepted answer, here are some scripts that I've worked out to do the job.


Find all the fonts used
Replace the fonts


Use the first script to get the exact name of the fonts that are being used. Then edit the array at the top of the second script with the names of fonts you want to substitute.

var substitutions = [
['BellGothic BT', 'Bold', 'Roboto', 'Condensed'],
['BellGothic Blk BT', 'Black', 'Roboto', 'Bold Condensed'],
];


Note that on large folders these scripts might take a long time.

10% popularity Vote Up Vote Down


 

@Carla748

Using Actions may help, and is a good strategy if you can get it to work (Actioning several Find Font commands for all the different type styles you have).



Another method, if you're game, is using a text editor to edit the documents. It's a bit more risky, but could certainly blast through thousands of documents in a very short space of time.

Here's some steps that might get you started.


Duplicate all the documents you wish to edit. I can't stress this enough... there's a very good chance you'll do some serious damage if you're not careful, so you'll want to work on copies.
Depending on the text editor you're using, you may need to rename all the files to be .txt rather than .ai. If you're using OS X, Apple's free Automator app can do this (it's in your Applications folder already). The Automator Action you want is Rename Finder Items.
Open up one of the documents in a good text editor that can Find and Replace across documents. You'll probably want something like BBEdit, Coda, Espresso, TextMate or a similar editor that's for programming. I generally use Code for this type of thing.
Find the portions of code that contain the font info. Adobe Illustrator .ai files contain some XML that's probably the bit you'd like to change, so they should be pretty easy to work with. I just saved a document with some text in it. Here's some of the XML in my document that shows the font (you may need to change several places).




<rdf:li rdf:parseType="Resource">
<stFnt:fontName>MyriadPro-Regular</stFnt:fontName>
<stFnt:fontFamily>Myriad Pro</stFnt:fontFamily>
<stFnt:fontFace>Regular</stFnt:fontFace>
<stFnt:fontType>Open Type</stFnt:fontType>
<stFnt:versionString>Version 2.006;PS 002.000;Core 1.0.38;makeotf.lib1.6.6565</stFnt:versionString>
<stFnt:composite>False</stFnt:composite>
<stFnt:fontFileName>MyriadPro-Regular.otf</stFnt:fontFileName>
</rdf:li>





Rename all your files back to .ai.


You'll have to experiment a lot. You'll probably want to edit one document to see what the before and after look like, then try to automate it with one or several Find and Replace actions.

Once you have it working, you can apply that across all your files (remember, on the copies, not the original files!).

Is that going to work? Is it worth your time? Maybe yes, maybe no. It depends if this is a regular thing you need to do, how comfortable you are with the method and how many files you have.

Please note that changing the font will likely move elements and text may be significantly reflowed.

10% popularity Vote Up Vote Down


 

@Nimeshi706

You might take a look at scripting.

This link is to the Adobe forums with a discussion regarding scripts to alter fonts in Illustrator CS4. The same scripts should function in CS5 or CS6.

Illustrator Scripting Reference (click here)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme