Document Fonts in InDesign/InDesign Server — C++ Plugin
A document font in InDesign is a temporarily installed font only available to that particular document. Document fonts are also available only if the font has been used in the document, meaning not every font present inside the “Document Fonts” folder is loaded by InDesign, rather InDesign uses IUsedFontList.h to determine the fonts used by the document and loads only those fonts. For more details, see the section “Document installed fonts”
The list of fonts used in a document is build up during document open events and locally stored, can be access via ILocalFontManager.h
InterfacePtr <IFontMgr> docFontMgr(doc, UseDefaultIID());
ILocalFontManager* localFontMgr(static_cast <ILocalFontManager*> (docFontMgr.get()));
if (localFontMgr->IsFontAvailable(fontName))
{
// use font
}
“Document Fonts” is especially important in an environment if you’re running InDesign Server and processing thousands of jobs daily for different clients. Every client licenses their own fonts and you do not want to be installing your client’s font on your server as a system font, which would also make it available for other clients to use. That would be a breach of font license terms/EULA as fonts are usually individually licensed. Additionally, installing every client’s fonts would leave you with thousands of system fonts over time on your server, thus also considerably slowing down the performance of InDesign Server
InDesign Server read in every system fonts during application start up. Not only that, InDesign Server also periodically(IdleTask) scans and check for new fonts to load. So if you have thousands of fonts installed as a system font, it can really slow down the performance of InDesign Server.