vk-github18 opened a new pull request, #561: URL: https://github.com/apache/pdfbox/pull/561
## Summary 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. ## Motivation Some integrations require specialized `PDType0Font` implementations—for example, to provide custom font behavior alongside glyph layout. The existing implementation directly created `PDType0Font` instances and instantiated its font loaders internally, limiting customization without duplicating implementation code. ## 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. ## Compatibility Default font loading and glyph-layout behavior are unchanged. The new extension points are opt-in and intended for subclasses. ## Testing No test changes are included in this branch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
