gpui: Bump crates resvg and usvg to 0.44.0 (#20067)
Closes #17388 Release Notes: - N/A We are using gpui to build a project, and we want to render SVGs with the `<text>` tag. We use `resvg` and `usvg` with the same version as gpui, like `0.41.0`. However, when we enable the feature `text`, we get an error from `usvg`. ```shell error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> /Users/madcodelife/.cargo/git/checkouts/zed-23e65a6dff445450/e681a4b/crates/gpui/src/svg_renderer.rs:49:20 | 49 | let tree = usvg::Tree::from_data(bytes, &usvg::Options::default())?; | ^^^^^^^^^^^^^^^^^^^^^---------------------------------- argument #3 of type `&Database` is missing | ``` This error occurs because when the `text` feature is enabled, the `form_data` function needs an extra argument, `fontdb`. [The code is here](fb7e28513f/crates/usvg/src/parser/mod.rs (L98)
). They changed the API in version [`0.42.0`](b1d06e9463/crates/usvg/src/parser/mod.rs (L98)
). So, I updated the versions to the latest (0.44.0). This is our demo: ## Before: <img width="620" alt="image" src="https://github.com/user-attachments/assets/7c71f8b1-e5fe-4e60-8f21-bb3bd9924e03"> ## After: <img width="620" alt="image" src="https://github.com/user-attachments/assets/4b0a0602-928f-4017-b5df-859eeb5f6b4a">
This commit is contained in:
parent
608addf641
commit
e16d5c3a68
3 changed files with 12 additions and 20 deletions
|
@ -90,8 +90,8 @@ profiling.workspace = true
|
|||
rand = { optional = true, workspace = true }
|
||||
raw-window-handle = "0.6"
|
||||
refineable.workspace = true
|
||||
resvg = { version = "0.41.0", default-features = false }
|
||||
usvg = { version = "0.41.0", default-features = false }
|
||||
resvg = { version = "0.44.0", default-features = false }
|
||||
usvg = { version = "0.44.0", default-features = false }
|
||||
schemars.workspace = true
|
||||
seahash = "4.1"
|
||||
semantic_version.workspace = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue