fcalafat opened a new pull request, #351: URL: https://github.com/apache/pdfbox/pull/351
This pull request adds support for the DFLT (default) script to the GSUB (Glyph Substitution) system in FontBox, enabling script-neutral typographic features for fonts that use the DFLT script table. It introduces a new `GsubWorkerForDflt` class, updates the language enum, and provides comprehensive tests to ensure correct behavior for both pass-through and ligature substitution scenarios. **DFLT Script Support:** * Added a new `GsubWorkerForDflt` implementation to handle script-neutral GSUB features in the DFLT script, following OpenType recommendations for feature processing order (`ccmp`, `liga`, `clig`, `calt`). (`fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GsubWorkerForDflt.java`) * Updated the `Language` enum to include the DFLT script, allowing it to be recognized and processed. (`fontbox/src/main/java/org/apache/fontbox/ttf/model/Language.java`) * Modified the `GsubWorkerFactory` to return a `GsubWorkerForDflt` instance when the DFLT script is detected. (`fontbox/src/main/java/org/apache/fontbox/ttf/gsub/GsubWorkerFactory.java`) **Testing and Validation:** * Added a new integration test suite for `GsubWorkerForDflt`, verifying correct pass-through for fonts without ligature features and proper ligature substitution for fonts with standard ligatures in the DFLT script. (`fontbox/src/test/java/org/apache/fontbox/ttf/gsub/GsubWorkerForDfltTest.java`) -- 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]
