defines, that pathToFontDirs is a “URI of TTF file directory”.
Currently it seems, that it must be a directory in a (local) file system. Is this correct?
Our service using PD4ML is running in a cloud environment, where the only available file system is the TEMP file system. Therefore we are copying the TTF fonts from the JAVA resources class path or from an external HTTP server to the TEMP file system on startup and setup useTTF() with this directory within TEMP. But maybe we have overlooked something.
If you’ve got a limited access to the file system, it is good idea to collect fonts to a fonts/ dir, generate pd4fonts.properties for it and to pack the fonts incl. the .properties to a JAR. Once the JAR file is deployed in your application, the fonts can be referenced using pd4ml.useTTF("java:fonts"); where “fonts” corresponds to the name of the fonts folder in the JAR file.