Skip to content

wkt2svg: Fix SVG compatibility issues#198

Merged
Notgnoshi merged 3 commits intomainfrom
fix-svg
Oct 21, 2025
Merged

wkt2svg: Fix SVG compatibility issues#198
Notgnoshi merged 3 commits intomainfrom
fix-svg

Conversation

@Notgnoshi
Copy link
Owner

Closes #193

This was one of the things pointed out by the W3C SVG validator.

See: https://validator.w3.org/check
According to [1], the transform attribute is not supported on the <svg>
element in all browsers. So use a CSS transform instead, which has
better support.

Unfortunately this still isn't supported by ImageMagick through
librsvg2, but it's at least more conformant with web standards. If you
install inkscape, then ImageMagick will use that instead of librsvg2 to
render the SVG, but it doesn't support the transform:scale CSS property,
and won't flip the image upside-down.

[1] https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/transform#browser_compatibility
@Notgnoshi Notgnoshi merged commit 0d83d7e into main Oct 21, 2025
5 checks passed
@Notgnoshi Notgnoshi deleted the fix-svg branch October 21, 2025 23:54
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.

ImageMagick can no longer render SVGs generated by wkt2svg

1 participant