Revert to crates.io usvg v0.46 and anyrender_svg v0.13 - #697
Merged
Conversation
Compute SVG intrinsic dimensions in blitz-dom by re-parsing the root <svg> attributes with roxmltree/svgtypes, instead of relying on the forked usvg's Tree::intrinsic_dimensions.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
usvg v0.46 and anyrender_svg v0.13
usvg v0.46 and anyrender_svg v0.13usvg v0.46 and anyrender_svg v0.13
dotmonkey
added a commit
to tti-inspirata/ebook_blitz
that referenced
this pull request
Aug 13, 2026
…G intrinsic sizing 回归(usvg 0.46 正式版)等 41 个 commit - 取消此前对 DioxusLabs#606 的 revert:上游 DioxusLabs#697 已改用 crates.io usvg 0.46 + anyrender_svg 0.13, util.rs / node/element.rs / svg_background_size.rs 三个文件直接取上游, blitz-paint/render/background.rs 的 intrinsic_width/height 跟着改成方法调用。 - node/node.rs 的 set_transform:上游已自行实现与 fork 等价的 S*T*S^-1 缩放,取上游。 - layout/inline.rs:fork 的零尺寸定位容器 baseline-ascent 锚点与上游 DioxusLabs#637 的 inset_offset 取并集。 - parley 0.11 / skrifa 0.43 保持不变(上游本次未 bump)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the
[patch.crates-io]overrides forusvg(DioxusLabs/resvg fork) andanyrender/anyrender_svg(DioxusLabs/anyrender fork branch), returning to pure crates.io dependencies while keeping SVG intrinsic-sizing behaviour:Tree::intrinsic_dimensionsis replaced by an in-BlitzSvgIntrinsicDimensions { width, height, view_box_size }, computed inparse_svg_imageby re-parsing the root<svg>'swidth/height/viewBoxattributes withusvg::roxmltree+ a directsvgtypesdep (matching usvg's own parsing: percentages kept unresolved, absent attrsNone, viewBox validated as finite/positive).SvgImageDataaccessors (intrinsic_width,resolved_width,viewbox_aspect_ratio, ...) are unchanged in behaviour.usvgis downgraded 0.48.1 → 0.46.0, which is what crates.ioanyrender_svg0.13 requires. The fork branch's "don't apply SVG text transform twice" fix is only needed against usvg 0.48 ("Text nodes now inherit their absolute transform" changed in 0.48.0), so anyrender needs no new release.Non-UTF-8 sources (e.g. SVGZ) skip the attribute re-parse and fall back to
usvg::Tree::size, matching the pre-fork behaviour of having no declared dimensions.Note: usvg 0.46 reverts SVG text rendering to the rustybuzz/ttf-parser stack (0.48 moved to harfrust/skrifa); this goes away again once upstream linebender/resvg#1119 ships and usvg can be re-bumped.
Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/14862dc9892246ca9c154ba95ceae878
Requested by: @nicoburns
WPT results
0 newly passing, 9 newly failing (net -9).
Full diff (9 changed tests)
Generated by the WPT workflow.