[
https://issues.apache.org/jira/browse/PDFBOX-6306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148676#comment-18148676
]
Tilman Hausherr commented on PDFBOX-6306:
-----------------------------------------
That is something that I suspected in PDFBOX-4951 (in 19/May/2026). However,
this was solved with \{{AbstractGlyphLayoutProcessor.getStringWidthUni()}}.
If you think you can do something that {{font.getStringWidth()}} works, then it
would be better to have some general solution that benefits all users. Your
code change does not uses the (newly) protected constructor, unless I missed
something.
> 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]