Exporting to multiple paths (destinations)

Hi there,
I was wondering if there is a possibility to export fonts to more than one destination (for example the Indesign fonts folder, and the Illustrator font folder, and a folder that is synchronised with my cloud drive) - for my workflow this would be very useful.

I found the “Export Path” parameter but was not able to put it to use.

Maybe someone is looking for the same feature and knows a workaround (script)?

:smiley:
Thanks,
Harald

You could, using a script. Paste below in the Macro window, and set how many export destinations you want in the same manner.

for ins in Glyphs.font.instances:
    if ins.exports is True:
        ins.generate("/Users/toshi/Desktop")
        ins.generate("/Users/toshi/Pictures")
1 Like

By the way, Adobe has a unified fonts folder. It’s in /Librady/Application Support/Adobe/Fonts (the Fonts folder may not exist yet, in which case you can make one. App restart is required). Then you do not need to have separate folders for InDesign and Illustrator.

1 Like

If you use the /Library/Application Support/Adobe/Fonts folder, the first two exports are not needed.

Also the non-script solution would be to have duplicate instances whose Export Path custom parameters are set to different locations.

Thank you @Tosche for the inspiration, I wrote this script below, gave it a short-cut (through the system preferences) and it works like charm. I could not get the ins.generate to work and had to use instance.generate - but I had also issues on the way with the correct addressing of the location, Maybe I confused something there.

Now everything works as expected. All instances are successfully exported to the Application Supports Folder, BUT do not show up in InDesign. Any ideas @GeorgSeifert @Tosche why this could be the case?

:pray:
Thank you.

#MenuTitle: Export to multiple destinations

exportFolder1 = '/Volumes/1 TB/Creative Cloud Files/_fonts'
exportFolder2 = '/Users/haraldgeisler/Library/Application Support/Adobe/Fonts'
    
for instance in Glyphs.font.instances:
    instance.generate(FontPath = exportFolder1)
    instance.generate(FontPath = exportFolder2)
    
Glyphs.showNotification('Export fonts', 'The script export to multiple destinations of %s was successful.' % (Glyphs.font.familyName))

Sorry, the “ins” name doesn’t matter but FontPath= was missing.

If you have made a Fonts folder while you are still running an CC app, you need to restart the app for the folder to be recognised.

1 Like

Yes, use the Adobe Fonts folder:

And a folder action that copies new font files to your iCloud Drive automatically. Easy to do in Automator.

Thanks @Tosche, I found the error… there are two Adobe Application Support folders and both contain a Fonts folder :scream_cat: The one that I used, is stored in the User’s folder Library:
/Users/USERNAME/Library/Application Support/Adobe/Fonts/
…which has no effect.

The one that works is the Library directly stored on the system drive
/Library/Application Support/Adobe/Fonts/

Maybe I am the only one who made that mistake… but maybe its worth mentioning in the tutorial @mekkablue referenced that there are two folders that are very similar
/Library/Application Support/Adobe/Fonts/
and
/Users/USERNAME /Library/Application Support/Adobe/Fonts/

The corrected script
that works for me:

#MenuTitle: Export to multiple destinations

exportFolder1 = '/Volumes/1 TB/Creative Cloud Files/_fonts'
exportFolder2 = '/Library/Application Support/Adobe/Fonts/'
        
for instance in Glyphs.font.instances:
        instance.generate(FontPath = exportFolder1)
        instance.generate(FontPath = exportFolder2)
        
Glyphs.showNotification('Fonts Exported', 'The script export to multiple destinations of %s was successful.' % (Glyphs.font.familyName))

:wrench:

@mekkablue Thank you for the tip with Automator, until now I just use Automator for renaming. I assume that just exporting to one destination and then use Automator to copy to a different location would be time efficient since each instance.generate takes up render time. Would Automator than run in the background and “watch the folder” - or would I have to execute the automator script manually after export, if so would it be possible to call automator from within the Glyphs script? - …maybe could you give me a tip where to look for tutorials on automator?

Thanks!

Yes, but the system’s folder action does that, not Automator. Automator is just for writing your workflow. Once you add it to the folder (can also be done from within Automator), macOS watches the folder and executes the workflow. It is not very fast (sometimes takes a few seconds to trigger), but reliable.

Just try it, it’s easier than you think.