Product Decisions This Supports
- Build vs. buy for PDF generation. This package is a building block, not a product. It informs the strategic call between assembling an in-house PHP rendering pipeline on the TCPDF/tc-lib-pdf stack versus licensing a commercial engine (Aspose, PDFTron/Apryse) or offloading rendering to headless Chromium. If font fidelity, subsetting, and archival compliance are our differentiators, owning this layer has value; if PDFs are incidental, buying or Chromium wins.
- Typography and font strategy. Decisions on embedding vs. referencing base-14 fonts, TrueType/OpenType/CJK coverage, dynamic font fallback stacks, and subsetting to control output size for high-volume document jobs (invoices, statements, contracts, shipping labels).
- Localization roadmap. Non-Latin scripts, CJK, and RTL languages are gated by font metrics, encoding, and embedding support. This package is the enabling mechanism — roadmap items like "generate invoices in Japanese and Arabic" become a dependency decision rather than a research project.
- Compliance and accessibility roadmap. PDF/A (1b/2b/3) and PDF/UA require embedded fonts with complete metrics and correct encodings. Adopting this layer now reduces rework if archival or accessibility compliance enters scope.
- Vendor and ecosystem risk. 22 stars and zero dependents on this repo are misleading signals — it sits inside the TCPDF ecosystem (100M+ installs) but is a narrow, single-maintainer module. That asymmetry should drive a pin-and-wrap decision rather than a bet-the-roadmap decision.
- Licensing exposure. License is
NOASSERTION — legally unresolved. This is a blocking gate for commercial redistribution and must be resolved before any roadmap commitment.
- Modularization vs. monolith. If we already run TCPDF, adopting the split package lets font workflows be versioned, tested, and upgraded independently of the rendering engine — a maintainability lever, not a feature lever.
When to Consider This Package
Adopt when:
- We generate PDFs server-side in PHP and need font-level control (metrics, encodings, embedding, subsetting) that higher-level wrappers don't expose.
- We are already on, or actively migrating to, the tc-lib-pdf/TCPDF ecosystem — this is an internal component of that stack, not a standalone tool.
- The requirement set includes custom corporate typefaces, multi-script/Unicode content, or PDF/A-style compliance.
- Output size or generation cost matters at volume, making subsetting control worth owning.
- We are willing to wrap the dependency behind our own abstraction and write integration tests, since upstream maturity is documented at "readme" level.
Look elsewhere when:
- The real requirement is "HTML/CSS to PDF" — use headless Chromium, Dompdf, or a hosted rendering API. This package will not help.
- The team isn't on PHP, or doesn't already own a PDF rendering engine to plug it into.
- We need commercial support, an SLA, a security disclosure process, or multiple maintainers.
- Legal cannot clear a
NOASSERTION license — treat as a hard blocker until resolved.
- A dedicated font parsing/management library (or the OS/system font stack) already covers the need outside PDF composition.
Adoption posture: pin versions, isolate behind an internal font-service interface, and treat upstream as a dependency we may need to fork. Zero dependent repos means limited community validation — our integration tests are the real safety net.
How to Pitch It (Stakeholders)
For executives: This is a small, free PHP component that handles the hardest, least visible part of producing professional PDFs — fonts. It manages embedding, metrics, encodings, and fallback across languages, which is what makes multilingual documents and archival-grade output possible without per-document licensing fees. It belongs to the TCPDF ecosystem with 100M+ installs, which substantially lowers technical risk. Two caveats to state plainly: it is a low-level dependency we would integrate, not a product we ship, and its license is currently flagged as unresolved, so legal sign-off is required before it goes into anything customer-facing.
For engineering: A Composer package in the tc-lib-pdf chain covering font import, metrics, encoding, and runtime font-stack/fallback management. It removes the need to hand-roll subsetting and encoding logic, which is where most PDF font bugs live. It is narrow and single-maintainer, so we pin versions, wrap it behind our own FontProvider-style interface, and cover it with integration tests on real documents. Adopting it now keeps the door open to swap in a commercial renderer or Chromium later without rewriting call sites.
For product/program: Enables multilingual invoices, contracts, and reports, brand-accurate typography, and a credible path to PDF/A and accessibility compliance — all at near-zero licensing cost. The trade-off is integration effort and vendor concentration, both mitigable with an abstraction layer. Recommended sequencing: legal review first, then a time-boxed spike against our two most demanding document templates before committing to the roadmap.