Repository navigation
feat(pdf): embed Unicode TrueType fonts in XObject previews - #34
Merged
Merged
Conversation
Implement Type0/Identity-H font resources, ToUnicode mappings, font metrics, and basic contextual Arabic and RTL text rendering. Refs: #33 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Exercise font parsing, Arabic joining, PDF export and multilingual ToUnicode extraction; document configuration and test fixtures. Refs: #33 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…ported shaping Split sfnt table parsing, Unicode cmap, glyph selection and PDF font resource serialization into focused components. Remove incomplete custom Arabic presentation shaping, strengthen font bounds and embedding checks, and cover unsupported scripts and malformed fonts with regressions. Refs: #33 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Install CJK font fixtures for mutation testing and avoid repeated apt-get update in integration, coverage, and unit workflows. Refs: #33 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Validate individual sfnt field reads against their declared table lengths, reject invalid glyph metric indices and malformed cmap tables, and add focused malformed-font regression cases. Refs: #33 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Infection executes the full PHPUnit suite before mutation testing; Unicode extraction integration tests require pdftotext. Ensure the mutation runner installs the same PDF utility as integration CI. Refs: #33 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add boundary-focused data providers for UTF-8 and UTF-16BE encoding, binary table reads, and format 4/12 cmap lookup and validation. Refs: #33 Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…onts Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos
marked this pull request as ready for review
November 23, 2026 22:45
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Refs #33; related to LibreSign/libresign#8155 and LibreSign/libresign#8236. The previous code wrote UTF-8 bytes directly to PDF literal strings with built-in Type1 fonts. Windows-1252 is not a complete solution.
Implemented in this draft
Review-driven CI fixes
apt-get updatefrom affected workflows; use package installation against runner indexes only.Evidence (local, current code)
git diff --checkpassed.Must resolve before merge/release
__TrueTypeFontresources directly toSignatureAppearanceXObjectDtountil a compatible adapter and signed-PDF integration tests exist.Draft by design. No new release should be cut from this branch until these blockers are resolved.