Skip to content

Fix/svgview stability#3

Open
m24130 wants to merge 4 commits into
rustui:mainfrom
m24130:fix/svgview-stability
Open

Fix/svgview stability#3
m24130 wants to merge 4 commits into
rustui:mainfrom
m24130:fix/svgview-stability

Conversation

@m24130

@m24130 m24130 commented Apr 7, 2026

Copy link
Copy Markdown

No description provided.

m24130 and others added 4 commits April 7, 2026 12:10
- Add linux/ directory with CMakeLists.txt and prebuilt libresvg.so (x86_64)
- Register linux platform in pubspec.yaml (ffiPlugin: true)
- Update src/resvg.h from v0.42.0 to v0.47.0
- Regenerate FFI bindings from new header
- New APIs: resvg_options_set_stylesheet, resvg_get_object_bbox
- All existing APIs remain compatible
feat: add Linux platform support + upgrade resvg to v0.47.0
- Use calloc instead of malloc for render pixel buffer to prevent
  uninitialized memory artifacts (stripes/garbage in transparent areas)
- Guard width <= 0 || height <= 0 in render() to prevent resvg_render
  panic when widget receives zero-size constraints during window resize
…stency

- Free toNativeUtf8() allocation after resvg_parse_tree_from_data (memory leak)
- Check resvg_parse_tree_from_data return code, return null on error
- Load system fonts via resvg_options_load_system_fonts for text rendering
- Use calloc.free() consistently for calloc-allocated pixel buffers
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