Skip to content

Conversation

@rlasskiy
Copy link
Contributor

@rlasskiy rlasskiy commented Dec 22, 2025

Full Unicode support for PDF text rendering by switching from simple font encoding to CID fonts with Identity-H encoding.
The change enables proper rendering of international characters including Latin accents, Greek, Cyrillic, and special characters that were previously unsupported

Key changes:

  • Replaced simple font encoding (Latin/Greek/Cyrillic) with CID font encoding for universal Unicode support
  • Added test coverage for various Unicode character sets and special characters
  • Introduced three new PDF validation functions to check
    • Password requirements
    • Edit restrictions
    • And DocMDP P1 certification status

@rlasskiy rlasskiy requested a review from Copilot December 22, 2025 08:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements full Unicode support for PDF text rendering by switching from simple font encoding to CID fonts with Identity-H encoding. The change enables proper rendering of international characters including Latin accents, Greek, Cyrillic, and special characters that were previously unsupported.

Key changes:

  • Replaced simple font encoding (Latin/Greek/Cyrillic) with CID font encoding for universal Unicode support
  • Added comprehensive test coverage for various Unicode character sets and special characters
  • Introduced three new PDF validation functions to check password requirements, edit restrictions, and DocMDP P1 certification status

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
pdf_handler.c Implemented CID font encoding with hex string conversion for Unicode text, added PDF validation functions (password, restrictions, DocMDP)
pdf_handler.go Added wrapper functions for new PDF validation checks, standardized duration metrics calculation
pdf_handler.h Declared new C function signatures and output structures for PDF validation
pdf_handler_font_test.go Added comprehensive Unicode test suite covering 20 test cases for various character sets

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rlasskiy rlasskiy merged commit 6157acf into main Dec 22, 2025
1 of 3 checks passed
@rlasskiy rlasskiy deleted the rlasskiy/use_cid_font branch December 22, 2025 08:55
rlasskiy added a commit to Nitro/lazyraster that referenced this pull request Dec 22, 2025
Full Unicode support for PDF text rendering by switching from simple font encoding to CID fonts with Identity-H encoding.
The change enables proper rendering of international characters including Latin accents, Greek, Cyrillic, and special characters that were previously unsupported

Key changes
- `go get github.com/nitro/lazypdf/v2@latest`
    -  Nitro/lazypdf#181
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