Since 2.0 PdfBox can render embedded fonts. However I can not influence what PDFs come in and there are certain PDFs without embedded fonts. In that case the fonts installed on the system are used. Now due to some restriction I can also not install fonts on that (server) system. So it would be nice if there is the possibility to register additional fonts supplied as a jar file in the classpath. I tried
PDType0Font.load(...)
PDTrueTypeFont.loadTTF(...)
however this only seems to be for creating new documents. I stumbled over this post however the solution was to use the embedded fonts.
So I thought about writing my own FontDirFinder (even though the name would not be 100% correct) but the implementation in the FontFileFinder class (method) determineDirFinder() doesn't allow (yet) to register an own Finder. So a patch would be necessary.
But before working on that I would like to ask whether there is some existing possibility to make font files known to PDFBox (without embedding or coping to/using system fonts)?
So basically I can not change the PDFs and not the server font directory/infrastructure. But I can supply additional fonts as part of the deployment (part of a jar file etc). (and I look for a way to get PdfBox to recognize these)