[
https://issues.apache.org/jira/browse/PDFBOX-6306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149943#comment-18149943
]
Volker Kunert commented on PDFBOX-6306:
---------------------------------------
Thanks for considering my proposal.
Instead of changing the current constructor, the addition of a new constructor
like
```
{{protected PDType0Font(PDDocument doc, byte[] fontBytes, boolean embedSubset,
boolean vertical) throws IOException {}}
{{ this(doc, (new TTFParser()).parse(new
RandomAccessReadBuffer(fontBytes)),}}
{{ embedSubset, true, vertical);}}
{{}}}
```
would also be helpful.
> Make PDTYpe0Font and GlyphLayout* extensible
> --------------------------------------------
>
> Key: PDFBOX-6306
> URL: https://issues.apache.org/jira/browse/PDFBOX-6306
> Project: PDFBox
> Issue Type: Improvement
> Affects Versions: 3.0.8 PDFBox
> Reporter: Volker Kunert
> Priority: Major
> Fix For: 3.0.9 PDFBox, 4.0.0
>
>
> See [https://github.com/apache/pdfbox/pull/561]
>
> This change adds extension points to the PDFBox glyph-layout processors and
> font loaders, allowing subclasses to customize font creation without
> replacing the existing loading and layout flow.
> This is meant to help the integration in OpenHtmlToPDF.
> h2. Changes
> * Add overridable font-loader factory methods to {{GlyphLayoutProcessorAwt}}
> and {{{}GlyphLayoutProcessorFop{}}}.
> * Add overridable {{loadPDType0Font(...)}} methods to the AWT and FOP font
> loaders.
> * Make the {{PDType0Font}} constructor that accepts a {{TrueTypeFont}}
> {{{}protected{}}}, enabling subclasses to create specialized Type 0 fonts.
> * Make {{supportsFont(...)}} verify that the supplied font is a
> {{PDType0Font}} before checking loader support.
> *
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]