docs(adr): record PDF library choice (mutool over hexapdf/origami)#52
Open
ronaldtse wants to merge 1 commit into
Open
docs(adr): record PDF library choice (mutool over hexapdf/origami)#52ronaldtse wants to merge 1 commit into
ronaldtse wants to merge 1 commit into
Conversation
Establishes docs/adr/ as the home for Architecture Decision Records, and captures the mutool-vs-alternatives decision so future explorers don't re-spike it. The decision was reached after a full investigation prompted by the proposed switch to a pure-Ruby PDF library: - hexapdf: technically superior to mutool but AGPL-3.0 / commercial — incompatible with ucode's BSD-2-Clause gemspec. - origami: LGPL-3.0+ (compatible), but source has the literal comment "TODO: Type0 and CID Fonts" at font.rb:101, broken on Ruby 3.0+ (Hash.new keyword-arg syntax removed in 3.0), and abandoned upstream (last commit January 2019). - Other Ruby PDF libraries (pdf-reader, prawn, combine_pdf) target different use cases and lack Type0/CIDFont support. mutool stays. The shell boundary stays isolated through the existing Glyphs::EmbeddedFonts::Catalog and PageRenderer classes; the rest of the codebase never shells out directly.
🔗 Link Check Failed |
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.
Summary
docs/adr/as the home for Architecture Decision Records (Nygard template)docs/architecture.mdso the ADR is discoverableWhy
The mutool dependency was challenged during a recent investigation (
REQ-code-chart-svg-extraction.md). Three alternatives were evaluated:# TODO: Type0 and CID Fontsliterally in source atfont.rb:101, broken on Ruby 3.0+ (removed keyword-arg-to-Hash syntax), abandoned upstream (last commit Jan 2019).The mutool path stays. Recording the reasoning in an ADR prevents the next contributor from re-spiking the same alternatives.
Test plan
docs/architecture.md#referencesREADME.mdindocs/adr/explains the format and indexes the records