Skip to content

Add SVG image support#38

Merged
rowland merged 3 commits intomasterfrom
svg-support
Mar 29, 2026
Merged

Add SVG image support#38
rowland merged 3 commits intomasterfrom
svg-support

Conversation

@rowland
Copy link
Copy Markdown
Owner

@rowland rowland commented Mar 29, 2026

Summary

  • add SVG-as-image support across svg, pdf, and ltml
  • route SVG through the existing image APIs and LTML <image> path
  • add samples, fixtures, tests, and docs for the supported SVG subset

What changed

  • added a new svg package for XML parsing, style parsing, transforms, scene modeling, and path parsing including elliptical arcs
  • added explicit SVGDimensions* and PrintSVG* APIs, plus SVG auto-detection in the existing image APIs
  • added PDF-side SVG rendering for shapes, paths, clip paths, and basic text
  • added LTML integration so <image src="...svg"> works unchanged
  • added docs, samples, a golden PDF, and a tmp-SVG sample runner for visual verification
  • fixed follow-up issues around class-based internal stylesheet fills and metadata-only elements like <title> / <desc>

Verification

  • go build ./...
  • go test ./svg ./pdf ./ltml
  • go run ./samples test_016_tmp_svgs

@rowland rowland merged commit 5abeff3 into master Mar 29, 2026
2 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.

1 participant