[
https://issues.apache.org/jira/browse/PDFBOX-6306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148668#comment-18148668
]
Volker Kunert commented on PDFBOX-6306:
---------------------------------------
With the porposed changes I would be able to return a sub class from
PDType0Font with an overridden
getStringWidth, that returns the correct width as provided by
GlyphLayoutProcessor.
At all places, where font.getStringWidth() is called in OpenHtmlToPdf, this
change would provide the correct width.
> 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]