Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @resvg/resvg-js from 2.4.1 to 2.6.0 #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Nov 28, 2023

Bumps @resvg/resvg-js from 2.4.1 to 2.6.0.

Release notes

Sourced from @​resvg/resvg-js's releases.

v2.6.0

What's Changed

🚀 Up to 115x faster for very large SVG files

Now resvg has been upgraded from v0.29.0 to v0.34.0, bringing with it a host of new SVG features and performance improvements.

  • Support SVG2 mask-type property.

  • Allows quadratic Bézier curves: text might render slightly differently (better?). This is because TrueType fonts contain only quadratic curves and we were converting them to cubic before.

  • Clipping and masking is up to 20% faster.

  • Reduces the peak memory usage for SVGs with large paths (in terms of the number of segments).

  • A new rendering algorithm. When rendering isolated groups, aka layers, we have to know the layer bounding box beforehand, which is ridiculously hard in SVG. Previously, resvg would simply use the canvas size for all the layers. This means that to render a 10x10px layer on a 1000x1000px canvas, we would have to allocate and then blend a 1000x1000px layer, which is just a waste of CPU cycles. The new rendering algorithm is able to calculate layer bounding boxes, which dramatically improves performance when rendering a lot of tiny layers on a large canvas. Moreover, it makes performance more linear with a canvas size increase. The paris-30k.svg sample from google/forma is rendered 115 times faster on M1 Pro now. From ~33760ms down to ~290ms. 5269x3593px canvas. If we restrict the canvas to 1000x1000px, which would contain only the actual paris-30k.svg content, then we're 13 times faster. From ~3252ms down to ~253ms.

Added

Full Changelog: thx/resvg-js@v2.5.0...v2.6.0

v2.5.0

What's Changed

Added

Now we can finally loading custom fonts in Wasm, including the WOFF2 format (see playground), thanks to the high-performance woff2-rs.

In addition, we implemented smarter default font family fallback. the defaultFontFamily option can now be omitted. We'll read the font-family from the incoming fonts and set it to the default.

<script src="https://unpkg.com/@resvg/resvg-wasm"></script>
<script>
  (async function () {
    await resvg.initWasm(fetch('https://unpkg.com/@resvg/resvg-wasm/index_bg.wasm'))
const font = await fetch('./fonts/Pacifico-Regular.woff2')

</tr></table>

... (truncated)

Changelog

Sourced from @​resvg/resvg-js's changelog.

[2.6.0] - 2023-10-20

🚀 Up to 115x faster for very large SVG files

Now resvg has been upgraded from v0.29.0 to v0.34.0, bringing with it a host of new SVG features and performance improvements.

  • Support SVG2 mask-type property.

  • Allows quadratic Bézier curves: text might render slightly differently (better?). This is because TrueType fonts contain only quadratic curves and we were converting them to cubic before.

  • Clipping and masking is up to 20% faster.

  • Reduces the peak memory usages for SVGs with large paths (in terms of the number of segments).

  • A new rendering algorithm. When rendering isolated groups, aka layers, we have to know the layer bounding box beforehand, which is ridiculously hard in SVG. Previously, resvg would simply use the canvas size for all the layers. Meaning that to render a 10x10px layer on a 1000x1000px canvas, we would have to allocate and then blend a 1000x1000px layer, which is just a waste of CPU cycles. The new rendering algorithm is able to calculate layer bounding boxes, which dramatically improves performance when rendering a lot of tiny layers on a large canvas. Moreover, it makes performance more linear with a canvas size increase. The paris-30k.svg sample from google/forma is rendered 115 times faster on M1 Pro now. From ~33760ms down to ~290ms. 5269x3593px canvas. If we restrict the canvas to 1000x1000px, which would contain only the actual paris-30k.svg content, then we're 13 times faster. From ~3252ms down to ~253ms.

Added

[2.5.0] - 2023-10-16

Added

Now we can finally loading custom fonts in Wasm, including the WOFF2 format (see playground), thanks to the high-performance woff2-rs.

In addition, we implemented smarter default font family fallback. the defaultFontFamily option can now be omitted. We'll read the font-family from the incoming fonts and set it to the default.

<script src="https://unpkg.com/@resvg/resvg-wasm"></script>
<script>
  ;(async function () {
    await resvg.initWasm(fetch('https://unpkg.com/@resvg/resvg-wasm/index_bg.wasm'))
const font = await fetch('./fonts/Pacifico-Regular.woff2')
if (!font.ok) return
const fontData = await font.arrayBuffer()
const buffer = new Uint8Array(fontData)

</tr></table>

... (truncated)

Commits
  • cfca7ad 2.6.0
  • 065b7f4 chore(deps): update actions/checkout action to v4
  • ce9b094 chore(deps): update yarn to v3.6.4
  • 6d3968a doc: updage Readme.md
  • 0337aaa test: fix test and update the example results
  • c041dd5 feat: upgrade to a newer resvg fork
  • de8b059 test: fix fontBuffers test
  • 88595e1 feat: upgrade to usvg/resvg 0.34
  • b07a26f 2.5.0
  • 4e68970 fix(deps): update rust crate svgtypes to 0.12.0
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@resvg/resvg-js](https://github.com/yisibl/resvg-js) from 2.4.1 to 2.6.0.
- [Release notes](https://github.com/yisibl/resvg-js/releases)
- [Changelog](https://github.com/yisibl/resvg-js/blob/main/CHANGELOG.md)
- [Commits](thx/resvg-js@v2.4.1...v2.6.0)

---
updated-dependencies:
- dependency-name: "@resvg/resvg-js"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Nov 28, 2023
Copy link

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file no-pr-activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants