Skip to content

Fix #139: SVG import paints paint-order="stroke" text strokes under the letters - #147

Merged
bflatastic merged 1 commit into
mainfrom
fix/issue-139
Oct 5, 2026
Merged

bflatastic merged 1 commit into
mainfrom
fix/issue-139

Conversation

@bflatastic

Copy link
Copy Markdown
Member

Fixes #139: text with paint-order="stroke" imports with its stroke under the letters.

  • The text import never read paint-order. When every character shares one stroke that paints before the fill, that stroke now becomes the text object's own stroke, placed below the Characters row, and the characters' own strokes are cleared. The canvas, SVG export and PDF export already draw this correctly.
  • Gradient and pattern strokes are resolved in document space.
  • If the characters' strokes differ, they are kept as they are and the import warns.
  • Tests: crates/svg/tests/text_paint_order.rs, including a pixel probe that finds 411 yellow letter pixels with the fix and 0 without it.

Checks

🤖 Generated with Claude Code

…he letters

The text import reads <text> from the XML and never looked at
paint-order, so character strokes always painted over the fill. A text
whose characters all share one stroke painted first now gets that
stroke as the object's own stroke below the Characters row (as the
canvas, SVG and PDF export already draw it), with its gradient or
pattern resolved in the document; characters with differing strokes
keep them and the import warns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Bug: SVG import ignores paint-order="stroke" on text (works on paths)

1 participant