Skip to content

Fix case with CFFType1FontProgram in OpenTypeFontProgram#704

Merged
MaximPlusov merged 1 commit into
integrationfrom
open_type
May 21, 2026
Merged

Fix case with CFFType1FontProgram in OpenTypeFontProgram#704
MaximPlusov merged 1 commit into
integrationfrom
open_type

Conversation

@MaximPlusov
Copy link
Copy Markdown
Contributor

@MaximPlusov MaximPlusov commented May 21, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved font format handling to better support complex nested font structures, enabling proper recognition of fonts that were previously not processed correctly.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f3b74a6a-3498-46b1-b32f-814bfacea8b5

📥 Commits

Reviewing files that changed from the base of the PR and between 5164caf and dca1c9f.

📒 Files selected for processing (1)
  • src/main/java/org/verapdf/pd/font/cff/CFFType1FontProgram.java

📝 Walkthrough

Walkthrough

The PR enhances CFFType1FontProgram.getCFFType1() to support multi-level font program unwrapping. It adds support for extracting CFFType1FontProgram from OpenTypeFontProgram wrapping and maintains existing CFFFontProgram unwrapping.

Changes

Font Program Unwrapping Enhancement

Layer / File(s) Summary
Font unwrapping logic
src/main/java/org/verapdf/pd/font/cff/CFFType1FontProgram.java
Imports OpenTypeFontProgram and reworks getCFFType1() to sequentially unwrap OpenTypeFontProgram and CFFFontProgram to extract the underlying CFFType1FontProgram.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A font unwraps its layers fine,
From OpenType to CFF inline,
The rabbit hops through wrapper chains,
To find the Type1 that remains! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main fix: handling CFFType1FontProgram when wrapped in OpenTypeFontProgram, which matches the primary change in the diff.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch open_type

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MaximPlusov MaximPlusov merged commit f0677e2 into integration May 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants