Copy link to clipboard
Copied
Hi,
I need to collect all font files used in an active document in Adobe Illustrator. By looking at the XML header, I'm able to create a list of fonts used in a document, but I can't locate the full path to the font file.
How do I locate the full path of the fonts used in a file? How does the "package" feature is able to collect the fonts?
Thank you
Copy link to clipboard
Copied
youre looking to do this with a script? not via the File > Package... option?
i dont know of any way to get the full path of a font... but in theory they should be coming from a specific place. so you could hard code the path to your system fonts (or whatever folder your font manager uses) and then get the font name from the api by looping all the textFrames in the document, making an array of the font names, via the TextFrameItem.textRange.textFont.name property, then write a text file with the full paths to each unique font name.
Copy link to clipboard
Copied
Edit: this info is for Indesign, sorry.
---
Hi @tmmls, you should be able to get the path to the font file using the location property of the Font.
- Mark
var font = app.fonts.itemByName('Arial\tBold'),
path = font.location;
$.writeln(path);
Copy link to clipboard
Copied
Hi Mark,
It seems that Illustrator does not have an app.fonts, but an app.textFonts. And a TextFont object has no location property.
I have found another approach to maybe solve this. By making a BridgeTalk connection, I can probably do it with Indesign as well. However, if I could only do it with Illustrator, that would be a better choice
Copy link to clipboard
Copied
Hi @tmmls, stupid me! On my phone, because of the forum UI, I can't easily see if it is an Illustrator or Indesign question. BridgeTalk/Indesign is a clever workaround.
- Mark