Thanks for the answer Tilman. The initial idea was to avoid a fork and keep the library up to date.
Don't you think that the feature of having a single directory as source of all available fonts could be used by others? Without changing the access level of the classes, it might be possible to add a configuration to the library, and in the background used a different implementation of FontDirFinder? Regards, On 2019/12/21 11:12:57, Tilman Hausherr <t...@t-online.de> wrote: > Am 20.12.2019 um 17:58 schrieb Guillem Saint-Germes:> > > Hello there,> > >> > > In order to be system agnostic when deploying a service which use PDFBox> > > 2.0.16, I would like to use a single specific directory as the source of> > > all available fonts (regardless of the system fonts).> > >> > > Looking at the code it seems that the only way to do that would be to use> > > FontMappers.set(FontMapper fontMapper) and implement a custom mapper.> > > However this would force me to reimplement all the nice things already> > > handled in FontMapperImpl, FileSystemFontProvider and FontFileFinder.> > >> > > So I thought we could overload FileSystemFontProvider constructor to> > > provide a (custom) FontFileFinder, and use this FontProvider> > > in FontMapperImpl.> > > But all those classes are package protected and thus not accessible from> > > the library users.> > >> > > Would you have any ideas or pointers on how to do this? It might require a> > > pull request on the library code to allow it.> > >> > > Disclaimer I am not sure if this is the right place to ask those questions,> > > but any feedback is welcome.> > > It is the right place... but why not just copy the code? We're usually > > reluctant to make stuff more available because this sometiimes results > > in new usages that nobody ever thought about, and it also locks the API.> > > Tilman> > > > >> > > Best Regards,> > > Guillem> > >> > > > ---------------------------------------------------------------------> > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org> > For additional commands, e-mail: users-h...@pdfbox.apache.org> > > -- This e-mail message and any attachments to it are intended only for the named recipients and may contain legally privileged and/or confidential information. If you are not one of the intended recipients, do not duplicate or forward this e-mail message.