-
-
Notifications
You must be signed in to change notification settings - Fork 120
Description
This ticket is taking over for tracespace/gerber-to-svg#36. See that ticket for some background.
I believe overuse of <use> is making our SVG output harder for browsers / image editors to deal with. For some things (e.g. referencing entire layers multiple times in pcb-stackup) <use> is the best solution for the job. For other things (e.g. individual pad flashes in a single layer) a <use> could be easily replaced in most instances with a single <path>.
Problems:
- Rendering nested
<use>s is slow (anecdotal) - Firefox (still!) has positioning problems with
<use> - Willing to bet that they make Inkscape unhappy in some way
This change should result in simpler SVG output and could even reduce the output file size (each <use> needs a corresponding shape in <defs> with a unique ID.
<use> tags in gerber-to-svg have some nice side-effects with regards to identifying which Gerber "tool" created a given shape by inspecting the id, but that sort of metadata could (and probably should) be attached to a data-attribute rather than inferred from an internal id.