Replace EPS/PS to SVG via postsvg (pure Ruby) - #68
Merged
Conversation
EPS-to-SVG and PS-to-SVG no longer shell out to Ghostscript + Inkscape.
Both call Postsvg.convert directly. The Ghostscript + Inkscape
two-step remains in place for EPS/PS -> PDF and EPS/PS -> PS/EMF (via
PDF intermediate) -- those will move in follow-up PRs.
- vectory.gemspec: add postsvg ~> 0.1
- lib/vectory/eps.rb, lib/vectory/ps.rb: require "postsvg"; to_svg =
Svg.from_content(Postsvg.convert(content))
- spec/vectory/eps_spec.rb: drop two stale error-propagation tests for
to_svg (they assumed the Ghostscript+Inkscape path)
- docs/features/{conversion,index}.adoc, docs/getting-started/core-concepts.adoc:
reflect new direct EPS/PS -> SVG path
Closes #67
🔗 Link Check FailedPlease fix the broken links and push a new commit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the Ghostscript + Inkscape two-step for
Eps#to_svgandPs#to_svgwith a direct call to the pure-Rubypostsvggem. Reads%%BoundingBoxfrom the DSC header for the SVG viewBox.Closes #67.
Changes
postsvg ~> 0.1require "postsvg";to_svg = Svg.from_content(Postsvg.convert(content))to_svg(they assumed the Ghostscript+Inkscape path)Test plan
bundle exec rspec— 191/191 pass (was 193; 2 stale tests removed)Caveats
postsvg 0.1.x has known limitations upstream (no text/font rendering, no image embedding, no gradients/patterns, no CMYK, no PS Level 2/3 advanced ops). EPS/PS files using those features will silently degrade when converted to SVG. This is acceptable for vectory's test fixtures (verified by the smoke test) but real-world users with complex EPS files may see regressions vs the old Ghostscript + Inkscape path.
Follow-ups
The full external-tool elimination is sequenced as 5 PRs (see issue thread on #67). This is PR 1. Remaining work:
to_eps/to_psAPI)