Files
oak-gpui/crates
Floyd Wang e16d5c3a68 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](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">
2024-11-06 21:40:22 +02:00
..
2024-11-01 13:20:30 -04:00
2024-10-27 19:44:21 -07:00
2024-10-24 12:14:03 -06:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-10-26 03:32:22 +03:00
2024-11-01 13:28:34 -06:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-10-02 13:27:16 +02:00
2024-10-31 22:24:24 -06:00
2024-11-05 21:45:45 -07:00
2024-11-06 10:06:25 -07:00
2024-11-06 10:06:25 -07:00
2024-10-30 11:26:54 -06:00