Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

DSW-PS
Copy link
Contributor

@DSW-PS DSW-PS commented Sep 9, 2019

Hi @danfickle
this is the pr I offered in issue #383 .

As per your suggestion I also added the functionality as useFont methods to the PdfRendererBuilder.

I moved the already existing PDFontSupplier to a normal class so we can extend it - I would have prefered a useFont / addFont with direct FSSupplier but I wasn't too keen on reordering parameters just to clear the type-earasure error as it would clash with the useFont/addFont(FSSupplier ...) methods.

DSW-PS and others added 3 commits September 6, 2019 10:56
This method allows to specify a FSSupplier<PDFont> that can either load
a PDFont or serve an already loaded one to cut down on duplicate fonts/
subsets if the user is also writing directly to the PDDocument with some
of the fonts used in the html.
Made PDFontSupplier (private static class in PdfBoxFontResolver) to
actual class that can be subclassed if needed.

Would have prefered to have a FSSupplier<PDFont> method in
PdfBoxFontResolver but due to type-erasure error that is not possible.

Added useFont(PDFontSupplier, ...) method to PdfRendererBuilder
@danfickle
Copy link
Owner

Thanks a lot @DSW-PS. All looks good.

@danfickle danfickle merged commit 5d4b37e into danfickle:open-dev-v1 Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.