Skip to content

Fix SVG viewport and path geometry - #143

Open
dajiaohuang wants to merge 2 commits into
dompdf:masterfrom
dajiaohuang:fix/svg-viewbox-and-path-geometry
Open

dajiaohuang wants to merge 2 commits into
dompdf:masterfrom
dajiaohuang:fix/svg-viewbox-and-path-geometry

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Oct 1, 2026 •

Copy link
Copy Markdown

Related: #128, #93

Changes

  • Preserve the Eyes in QR code get slanted/mangled (elliptic arcs are rendered incorrectly?) #128 arc correction: the previous dx+dy check could discard a valid arc with distinct endpoints when the deltas summed to zero. Coincident-endpoint arcs remain omitted, and zero-radius arcs remain lines.
  • applyViewbox now reads the parser-normalized preserveaspectratio key and matches the standard case-sensitive YMid and YMax alignment tokens. This fixes the existing Symbol/use viewport path; it does not initialize root Document or nested Group viewports, so this PR does not resolve all of viewbox is not correctly mapped to SVG viewport #93.
  • Reverts the unsupported fixed-length path-grouping change; no rendered grouping defect is claimed.

Validation

  • PHP 8.3.6 with DOM/XML: local base-vs-candidate regressions through Document and a recording SurfaceInterface showed the Eyes in QR code get slanted/mangled (elliptic arcs are rendered incorrectly?) #128 arc Bézier count 0→1, YMid translate-y 0→50, preserveAspectRatio="none" scale-y 1→2, and xMaxYMax translate-y 0→100.
  • These are parser/surface-call results, not PDF or visual acceptance. The full PHPUnit suite and candidate CI were not run; prior green checks belong to the previous head. The normal push may trigger the configured PHP 7.1–8.4 workflow; no manual CI action was taken.

@bsweeney bsweeney added this to the 1.0.3 milestone Oct 1, 2026
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.

2 participants