Skip to content

Fix connection labels and bus wire widths in SVG export - #340

Merged
milanofthe merged 2 commits into
mainfrom
fix/svg-export-connection-labels
Sep 19, 2026
Merged

milanofthe merged 2 commits into
mainfrom
fix/svg-export-connection-labels

Conversation

@milanofthe

Copy link
Copy Markdown
Member

Cloned inline SVG only kept fill, stroke and opacity, so everything a stylesheet set was dropped from the export. Connection labels lost their font, size, text-anchor, dominant-baseline and paint-order (16px serif, anchored bottom left, halo painted over the glyphs), and bus wires lost their extra stroke width, so they looked like ordinary wires.

Updated dom2svg bundle (milanofthe/dom2svg#2):

  • computed SVG presentation properties are inlined as attributes when they differ from the SVG default
  • SVG <text> is outlined to paths like HTML text, with the halo split into two stacked paths so PDF export keeps the paint order

Verified headlessly on a model with horizontal, vertical and bus labels: the export now matches the canvas.

@milanofthe
milanofthe force-pushed the fix/svg-export-connection-labels branch from 739a19a to 2cdb7db Compare September 19, 2026 08:11
@milanofthe
milanofthe merged commit 71e570d into main Sep 19, 2026
4 checks passed
@milanofthe
milanofthe deleted the fix/svg-export-connection-labels branch September 19, 2026 08:13
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.

1 participant