Replace emf2svg with pure-Ruby emfsvg gem - #65
Merged
Conversation
Swap the FFI wrapper (emf2svg-ruby around GPLv2 libemf2svg) for the pure-Ruby emfsvg gem. - vectory.gemspec: depend on emfsvg ~> 0.1 - lib/vectory/emf.rb: require "emfsvg"; collapse tmpdir dance to Svg.from_content(Emfsvg.from_bytes(content)) - spec/examples/emf2svg/ renamed to spec/examples/emfsvg/ - README.adoc and docs/**/*.adoc: terminology updates
🔗 Link Check FailedPlease fix the broken links and push a new commit. |
emfsvg 0.1.2 ships SVG-to-EMF translation. Vectory's Svg#to_emf now
calls Emfsvg.from_svg directly instead of shelling out to Inkscape,
dropping the Inkscape dependency for SVG/EMF (still needed for
SVG/EPS/PS/PDF).
- vectory.gemspec: require emfsvg >= 0.1.2
- lib/vectory/svg.rb: to_emf = Emf.from_content(Emfsvg.from_svg(content))
- spec/vectory/svg_spec.rb: drop stale Inkscape error-propagation test for to_emf
- docs/features/{conversion,index}.adoc, getting-started/core-concepts.adoc,
understanding/architecture.adoc: reflect new SVG/EMF path
Closes #66
🔗 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
emf2svggem (FFI wrapper around GPLv2libemf2svg) with the pure-Rubyemfsvggem from claricle. Vectory now usesemfsvgfor both EMF → SVG and SVG → EMF, dropping the Inkscape dependency for SVG ↔ EMF.Closes #66.
Changes
emf2svg→emfsvg "~> 0.1", ">= 0.1.2"(0.1.2 ships the SVG → EMF direction)require "emfsvg";to_svgcollapses from tmpdir +from_filetoSvg.from_content(Emfsvg.from_bytes(content))to_emfswaps fromInkscapeWrapper.converttoEmf.from_content(Emfsvg.from_svg(content))BUGREPORT.svg-to-emf-windows.md(historical emf2svg note, no longer relevant)Test plan
bundle exec rspec— 193/193 passRemaining Inkscape usage
After this PR, Inkscape is still used by:
Svg#to_eps,Svg#to_ps,Svg#to_pdf(SVG → EPS/PS/PDF)Pdf#to_svg(PDF → SVG)Eps#to_svgandPs#to_svgvia the Ghostscript + Inkscape two-step (EPS/PS → PDF → SVG)EPS/PS → SVG could move to
postsvg(pure Ruby) — tracked in #67. SVG → EPS/PS/PDF and PDF → SVG still have no pure-Ruby replacement and remain on Inkscape.Notes
The error class raised by
Svg#to_emfon conversion failure changes fromVectory::ConversionErrortoEmfsvg::Error(no longer wrapped throughInkscapeWrapper). Documented here as a contract change.