I am working with the InDesign server to render different templates. It uses a rendering (.jsx) script and data merge approach to render the indesign templates. Currently, I want to apply custom user fonts, using font files. Can I render the PDFs using custom font files in JSX script? If yes then please share with me the piece of code that demonstrates how can I achieve this.
Tried Wrokaround: I uploaded the fonts to the InDesign font directory and then waited for the InDesign server to cache these uploaded fonts. Once the fonts are cached. I match the font name (using the font's full name from my database) and then apply it to the text. But this solution fails when multiple users upload similar font family files as they are no longer cached and the name from the database does not match anymore for some of the users.