Skip to content

Remove punctuation symbols inside font family#706

Merged
MaximPlusov merged 3 commits into
integrationfrom
font
Jun 9, 2026
Merged

Remove punctuation symbols inside font family#706
MaximPlusov merged 3 commits into
integrationfrom
font

Conversation

@LonelyMidoriya

@LonelyMidoriya LonelyMidoriya commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced font family name extraction to remove common punctuation characters (comma, period, semicolon, colon, exclamation mark, question mark) from font identifiers. This improvement ensures more accurate font matching and consistent text rendering across different font specifications.

@LonelyMidoriya LonelyMidoriya self-assigned this Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3c58fc2b-d565-4695-b4bb-af73d9948dde

📥 Commits

Reviewing files that changed from the base of the PR and between 7cae651 and c17f31e.

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

📝 Walkthrough

Walkthrough

The PR adds a single-line enhancement to the extractFontFamilyFromFontName method that removes common punctuation characters (comma, period, semicolon, colon, exclamation, question mark) from the font name string before applying existing suffix removal and word normalization logic.

Changes

Font name character sanitization

Layer / File(s) Summary
Font name punctuation removal
src/main/java/org/verapdf/pd/font/PDFontDescriptor.java
The extractFontFamilyFromFontName method adds a regex replaceAll call to strip punctuation characters from the font name intermediate string before suffix removal and whitespace normalization.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • veraPDF/veraPDF-parser#705: Directly related — this PR adds punctuation stripping to the same extractFontFamilyFromFontName method that was modified in #705, extending the font name normalization pipeline.

Suggested reviewers

  • MaximPlusov

Poem

A rabbit hops through punctuation weeds,
Clearing commas, dots with care,
Font names bloom where clutter recedes,
Cleaner text floats through the air. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Remove punctuation symbols inside font family' is directly related to the main change, which strips common punctuation characters from font name strings in the PDFontDescriptor class.
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 font

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 fb7420a into integration Jun 9, 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