Implement SVG clip generator for --receipts=svg mode. Generates self-contained SVG documents from TTF/OTF glyph outlines via ttf-parser, with proper coordinate transform (PDF bottom-left origin to SVG top-left origin) and color space conversion. Components: - SvgGenerator: filters glyphs by bbox, extracts outlines - SvgPathBuilder: ttf-parser::OutlineBuilder impl for SVG paths - pdf_color_to_css(): DeviceRGB/Gray/CMYK to CSS colors Acceptance criteria: - SVG validates via quick-xml parse roundtrip - Aggregate size <= 500 KB for 100 receipts (test passes) - No external resource references (self-contained) - Handles missing glyph outlines gracefully - Coordinate transform unit-tested: (220, 432) → (20, 8) Also fix unstable as_str() → as_ref() in stream.rs test. Closes pdftract-5u8bp Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| DejaVuSans.ttf | ||