Skip to content

fix(svg): ignore point-less shape elements - #4917

Merged
behackl merged 1 commit into
ManimCommunity:mainfrom
behackl:fix-svg-empty-paths
Aug 7, 2026
Merged

fix(svg): ignore point-less shape elements#4917
behackl merged 1 commit into
ManimCommunity:mainfrom
behackl:fix-svg-empty-paths

Conversation

@behackl

@behackl behackl commented Aug 7, 2026

Copy link
Copy Markdown
Member

A change to SVG parsing in v0.20.0 caused point-less SVG elements to be retained. On Linux, Pango represents whitespace as empty paths, breaking character-to-glyph mapping in Text and resulting in shifted colors and missing lines in Code. This restores the previous behavior by ignoring point-less elements when converting an SVG to mobjects and adds a regression test.

If this works as intended, the rendered image included in the reference manual for Code should get its syntax highlighting fixed. (Broken, live version: https://docs.manim.community/en/stable/reference/manim.mobject.text.code_mobject.Code.html)

@behackl behackl added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Aug 7, 2026

@JasonGrace2282 JasonGrace2282 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@behackl
behackl merged commit d94f7f6 into ManimCommunity:main Aug 7, 2026
17 checks passed
@behackl
behackl deleted the fix-svg-empty-paths branch August 7, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bugfix Bug fix for use in PRs solving a specific issue:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants