Collect used fonts
Hello,
Is it possible to collect the used fonts in the active document?
Tried coding:
var myFonts=app.documents[0].stories.everyItem().textStyleRanges.everyItem().appliedFont;
len = myFonts.length;
var destFolder = "~/Desktop/usedFonts/";
if ( !Folder(destFolder).create() ){ exit(); }
while (len-->0) {
myfontpath = myFonts[len].filePath;
currFile = File( destFolder + File(myfontpath).name );
if ( !currFile.exists && File(currLinkFName).exists )
myfontpath[len].copyLink(currFile);
}
Regards,
K
