I am using iText to generate PDF files, which may include embedded fonts. iText includes a DefaultFontMapper class which allows us to specify a directory from which to load fonts that may then be embedded in the generated PDF files as needed. The program itself is run across a range of environments (Windows, Linux, Solaris…) and manually specifying directories has resulted in errors in the past (Due to directories being omitted).
My question is, “Is there a way in java to get all the directories from which fonts are loaded?”
I think it is only possible to list fontNames that are currently used (can be tricky due to
GraphicsEnvironmentbeing used on headless environment)