Skip to content

fix(convertPathData): properly handle consecutive t commands - #2156

Merged
KTibow merged 5 commits into
svg:mainfrom
KTibow:convertPathData-changes
Mar 13, 2026
Merged

fix(convertPathData): properly handle consecutive t commands#2156
KTibow merged 5 commits into
svg:mainfrom
KTibow:convertPathData-changes

Conversation

@KTibow

@KTibow KTibow commented Jul 10, 2025

Copy link
Copy Markdown
Collaborator

consecutive t commands have been mishandled for years (even with 40b57f3, i believe the second t doesn't get converted to a q). that changes now.

this would allow the folks over at remarkablemark/texsvg#762 to use convertPathData again.

KTibow and others added 2 commits July 10, 2025 16:02
When a t command follows a non-quadratic command, convert it to l.
When t follows t, convert the second t to q with proper control points.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@KTibow KTibow changed the title better handling of consecutive t commands fix(convertPathData): properly handle consecutive t commands Aug 12, 2025
folknor added a commit to folknor/svgo that referenced this pull request Feb 18, 2026
- Handle consecutive t commands properly (svg#2156)
  svg#2156
- Use relSubpoint for accurate post-rounding coordinates (svg#2157)
  svg#2157
- Introduce isSafeToRemove for smarter stroke-linecap handling (svg#2164)
  svg#2164

Note: reverted svg#2157's z-removal change (relSubpoint is already reset
to pathBase when z is processed, making the comparison always true).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KTibow KTibow added the merge conflicts Changes currently conflict with main label Mar 8, 2026
@KTibow KTibow removed the merge conflicts Changes currently conflict with main label Mar 8, 2026
@KTibow
KTibow merged commit 65548f4 into svg:main Mar 13, 2026
17 checks passed
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