Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

[PDFBOX-6103] Add DFLT script support in GSUB system for OpenType fonts#351

Open
fcalafat wants to merge 4 commits intoapache:3.0 from
fcalafat:3.0
Open

[PDFBOX-6103] Add DFLT script support in GSUB system for OpenType fonts #351
fcalafat wants to merge 4 commits intoapache:3.0 from
fcalafat:3.0

Conversation

@fcalafat
Copy link

@fcalafat fcalafat commented Nov 24, 2025

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /