Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpui: Bump crates resvg and usvg to 0.44.0 (zed-industries#20067)
Closes zed-industries#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](https://github.com/linebender/resvg/blob/fb7e28513f561ed847acbf4a6fb8b743474837a0/crates/usvg/src/parser/mod.rs#L98). They changed the API in version [`0.42.0`](https://github.com/linebender/resvg/blob/b1d06e9463a3b089fbd70e7c38aebbfc811311ff/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">
- Loading branch information