Skip to main content
dublove
Legend
Oct 2, 2026 4:07 AM UTC
Answered

Is there a script that can package and collect composite fonts?

Hello everyone.

This composite font is really confusing, I can't collect it, nor can I take it away.
There used to be a script that didn't seem to work with compound fonts. Has anyone really researched it?

https://community.adobe.com/questions-671/font-packaging-script-error-in-indesign-892434

For example, can you collect the fonts in the document below into the Document fonts directory?
Sometimes packaging can be collected, but sometimes packaging is not ineffective for many fonts.

    rob day
    rob dayCorrect answer
    Community Expert
    Oct 4, 2026 7:27 PM UTC

    Hi ​@dublove , The packageForPrint() document method works for me when I test your attached file:

     

    var f = Folder.selectDialog("Select a folder for the package", ""); 
    if (f) {
    app.activeDocument.packageForPrint (f,true,true,true,true,true,true,true,true,true, "[PDF/X-4:2008]", true, "Hello", true);
    }

     

    The packageForPrint parameter list

     

     

    My packaged folder:

     

    13 replies

    rob day
    Community Expert
    rob dayCommunity ExpertCorrect answer
    Community Expert
    Oct 4, 2026 7:27 PM UTC

    Hi ​@dublove , The packageForPrint() document method works for me when I test your attached file:

     

    var f = Folder.selectDialog("Select a folder for the package", ""); 
    if (f) {
    app.activeDocument.packageForPrint (f,true,true,true,true,true,true,true,true,true, "[PDF/X-4:2008]", true, "Hello", true);
    }

     

    The packageForPrint parameter list

     

     

    My packaged folder:

     

    Translate
    dublove
    dubloveAuthor
    Legend
    Oct 5, 2026 4:21 AM UTC

    Hi ​@rob day 

    It seems to be invalid for Chinese characters.
    It seems like we're back to that question from a long time ago:
    Are some fonts prohibited from being packaged?

     

     

     

    Translate
    rob day
    Community Expert
    Community Expert
    Oct 5, 2026 3:03 PM UTC

    The new document still works for me. Maybe it’s an OS read/write permissions setting? On MacOS I could set file permissions to Read Only, which would prevent copying

     

     

    Also, if I get Info for your aabb font via InDesign’s Find/Replace Font, the font has no Style or Version—not sure if that’s a problem. The copy Restrictions are set to Normal:

     

     

    Translate
    Community Expert
    Oct 2, 2026 11:07 AM UTC

    Yes, but there's an important difference between a normal font and a composite font.

    A composite font isn't really a font file. It's a definition that tells InDesign which actual fonts to use for particular character ranges. So a script which simply loops through `doc.fonts` and copies each font's `.location`, like the script in the older thread, isn't really sufficient for composite fonts.

    InDesign does expose composite fonts to scripting through `document.compositeFonts`, and each composite font has `compositeFontEntries`. Each entry contains the applied font and font style, so in principle a script can walk through the composite font, find every component font, resolve the actual font file and copy those files.

    There is also now a Composite Fonts script by Peter Kahrel:

    https://creativepro.com/composite-fonts/

    Peter notes that when a document containing composite fonts is packaged, the composite fonts are included in the package.

    I'd therefore try InDesign's native Package command first rather than a script that manually copies `font.location`. A script can also call `document.packageForPrint()` with font copying enabled.

    The other thing to remember is that the composite-font definition itself is separate from the actual OpenType/TrueType font files. InDesign stores composite-font definitions in its `CompositeFont` preferences folder.

    So, if the requirement is to make a completely portable package, I think the safest approach would be:

    1. Let InDesign package the document normally.
    2. Check the component fonts referenced by each `compositeFontEntry`.
    3. Verify that every component font exists in Document Fonts.
    4. Also preserve the composite-font definition.

    Fonts which cannot legally or technically be copied may still be skipped, so no script should blindly assume that every `.location` can be copied.

    It would certainly be possible to write a script specifically for this which reports the composite font, all of its component fonts, their file locations, and whether each one was successfully collected.

    Translate
    dublove
    dubloveAuthor
    Legend
    Oct 2, 2026 11:53 AM UTC

    Hi ​@Eugene Tyson .

    Is this script for packaging composite fonts or managing composite fonts?
    I tried it, but there seems to be no response.

    Translate