Skip to content

v0.11.1 — SVG stroke-linecap / stroke-linejoin fix

Choose a tag to compare

@danmolitor danmolitor released this 21 Aug 03:19
· 129 commits to main since this release

Patch release. Fixes a real user-reported SVG rendering bug.

Fixed

SVG stroke-linecap and stroke-linejoin are now honored. The engine's SVG parser was silently dropping both attributes on every element — SvgCommand::SetLineCap / SvgCommand::SetLineJoin only ever
fired from the Canvas API, never from SVG content. Every SVG stroke rendered with the PDF default (butt caps, miter joins) regardless of what the source said.

Reported against a real handwritten-signature repro: 68 short cubic bezier paths with stroke-linecap="round" rendered as visible flat rectangular cap protrusions at every segment terminus instead of blending
into smooth round semicircles. Fixed.

Attribute values also inherit through <g> group ancestors on the same stack as fill / stroke / stroke-width / opacity, so <g stroke-linecap="round">…</g> works as expected.

Who this affects

Anyone rendering SVG content — through <Svg content="..." /> in @formepdf/react or @formepdf/svelte, renderPdf on @formepdf/core, or the forme-pdf Rust crate — where any element uses
stroke-linecap other than the default butt, or stroke-linejoin other than the default miter. Very common pattern for signature capture widgets, chart annotations, and hand-drawn overlays.

Install

npm install @formepdf/react@0.11.1 @formepdf/core@0.11.1                                                                                                                                                         
# or                                                                                                                                                                                                             
npm install @formepdf/svelte@0.11.1 @formepdf/core@0.11.1 

Rust:
forme-pdf = "0.11.1"

No API changes. Drop-in.

Full changelogs

  • engine — the fix + 4 new integration tests
  • @formepdf/core — WASM rebuild carrying the fix

All other npm packages (shared, react, svelte, renderer, cli, hono, next, resend, mcp, sdk, tailwind, templates) got version-alignment bumps only.