Skip to content

feat: compile literal Unicode text boxes and normalize PDF resources - #37

Merged
vitormattos merged 4 commits into
mainfrom
feat/literal-text-layout
Nov 24, 2026
Merged

vitormattos merged 4 commits into
mainfrom
feat/literal-text-layout

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Scope

  • Add a plain-text compiler that reuses the existing text layout and PDF document builder without parsing HTML or interpolating already-resolved text.
  • Normalize canonical Unicode accents, preserve explicit line breaks and wrap at grapheme boundaries without inserting hyphens.
  • Materialize generated standard font dictionaries as indirect objects and omit empty font/XObject dictionaries in the PDF Core adapter.
  • Cover literal text extraction, layout boundaries, invalid UTF-8 and resource materialization with regression tests.

Prepares LibreSign/libresign#8236 to consume the library rather than duplicate layout and PDF resource handling.

Validation

  • Full PHPUnit suite: 1,169 tests, 8,408 assertions; 99.67% line coverage (before the final strict-comparison/style cleanup).
  • Final focused PHPUnit suite: 78 tests, 156 assertions.
  • Psalm: no errors; PHPCS on changed PHP files: passed.
  • Both commits are GPG verified and DCO signed.

Full hosted CI, compatibility and release remain to be reviewed. No changes to the LibreSign PR in this branch.

…ries

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Reuse text layout and PDF generation for resolved plain text. Preserve explicit line breaks, normalize canonical accents and wrap without adding hyphens.

Refs LibreSign/libresign#8236

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…rage

Separate literal text preparation from shared line breaking, reject invalid text and controls, simplify resource materialization, and cover observable boundary behavior. Restore README to the base version.

Refs LibreSign/libresign#8236

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Exercise native resource-builder callback integration instead of retaining the PDF Core 0.1 compatibility path.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos merged commit 5517125 into main Nov 24, 2026
24 checks passed
@vitormattos
vitormattos deleted the feat/literal-text-layout branch November 24, 2026 22:30
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.

1 participant