Skip to content

feat: Implement TrueType font embedding with subsetting#18

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
feat/truetype-font-support
May 22, 2026
Merged

feat: Implement TrueType font embedding with subsetting#18
ralflang merged 1 commit into
FRAMEWORK_6_0from
feat/truetype-font-support

Conversation

@ralflang
Copy link
Copy Markdown
Member

Summary

  • Full TrueType font support per ISO 32000-2 §9.6.3/§9.7
  • TTF binary parser (cmap format 4/12, all required tables)
  • Glyph subsetter producing minimal valid TTF binaries
  • CIDFont/Type0Font PDF structures with Identity-H encoding
  • ToUnicode CMap, CIDToGIDMap, FontDescriptor, FontFile2 embedding
  • PdfWriter setTrueTypeFont() and hex-encoded text output

Test plan

  • FontParser: 17 unit tests (table parsing, cmap lookups, metrics)
  • Subsetter: 8 unit tests (subset validity, glyph remapping, composites)
  • TrueTypePdfOutput: 14 end-to-end tests (PDF structure verification)
  • Full suite: 348 tests passing, no regressions

Closes #11

Add full TrueType font support per ISO 32000-2 §9.6.3/§9.7:
TTF binary parser, glyph subsetter, CIDFont/Type0Font structures,
Identity-H encoding with ToUnicode CMap for Unicode text output.

Closes #11
@ralflang ralflang merged commit d04a21e into FRAMEWORK_6_0 May 22, 2026
0 of 6 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.

feat: TrueType font support (ISO 32000-2 §9.6.3, §9.7) (Block B)

1 participant