Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Bump @resvg/resvg-js from 2.4.1 to 2.5.0#43

Closed
dependabot[bot] wants to merge 1 commit intov3-New_Horizonsfrom
dependabot/npm_and_yarn/resvg/resvg-js-2.5.0
Closed

Bump @resvg/resvg-js from 2.4.1 to 2.5.0#43
dependabot[bot] wants to merge 1 commit intov3-New_Horizonsfrom
dependabot/npm_and_yarn/resvg/resvg-js-2.5.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Oct 17, 2023

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

Release notes

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

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')
if (!font.ok) return
const fontData = await font.arrayBuffer()
const buffer = new Uint8Array(fontData)
const opts = {
font: {
fontBuffers: [buffer], // New in 2.5.0, loading custom fonts.
// defaultFontFamily: 'Pacifico', // You can omit this.
},
}
const svg = '&lt;svg&gt; ... &lt;/svg&gt;' // Input SVG, String or Uint8Array
const resvgJS = new resvg.Resvg(svg, opts)
const pngData = resvgJS.render(svg, opts) // Output PNG data, Uint8Array
const pngBuffer = pngData.asPng()
const svgURL = URL.createObjectURL(new Blob([pngData], { type: 'image/png' }))
document.getElementById('output').src = svgURL

})()
</script>

  • feat: improve custom loaded fonts. Thanks to @​yisibl #209
  • feat: support for loading custom fonts in Wasm, via the fontBuffers option. Thanks to @​antmelnyk #217
  • feat: support loading WOFF2 font in Wasm. Thanks to @​yisibl #220
  • chore: Wasm uses the same logic as Node.js to find the default font family.Thanks to @​yisibl #252

We have improved the upstream svgtypes#14, allow parsing of float rgb()/rgba() values from CSS Color 4 draft like rgb(3.14, 110, 201).

  • fix(deps): update rust crate svgtypes to 0.12.0. Thanks to @​yisibl #266

Changed

  • test: fix test image timeout. #262

... (truncated)

Changelog

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

[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)
const opts = {
font: {
fontBuffers: [buffer], // New in 2.5.0, loading custom fonts.
// defaultFontFamily: 'Pacifico', // You can omit this.
},
}
const svg = '&lt;svg&gt; ... &lt;/svg&gt;' // Input SVG, String or Uint8Array
const resvgJS = new resvg.Resvg(svg, opts)
const pngData = resvgJS.render(svg, opts) // Output PNG data, Uint8Array
const pngBuffer = pngData.asPng()
const svgURL = URL.createObjectURL(new Blob([pngData], { type: 'image/png' }))
document.getElementById('output').src = svgURL

})()
</script>

  • feat: improve custom loaded fonts. Thanks to @​yisibl #209
  • feat: support for loading custom fonts in Wasm, via the fontBuffers option. Thanks to @​antmelnyk #217
  • feat: support loading WOFF2 font in Wasm. Thanks to @​yisibl #220
  • chore: Wasm uses the same logic as Node.js to find the default font family.Thanks to @​yisibl #252

We have improved the upstream svgtypes#14, allow parsing of float rgb()/rgba() values from CSS Color 4 draft like rgb(3.14, 110, 201).

  • fix(deps): update rust crate svgtypes to 0.12.0. Thanks to @​yisibl #266

Changed

  • test: fix test image timeout. #262
Commits
  • b07a26f 2.5.0
  • 4e68970 fix(deps): update rust crate svgtypes to 0.12.0
  • 24b9f07 test: add load custom WOFF2 font test case
  • 6fb4fdc feat: add font loading demo to playground
  • 977e9ac feat: support loading woff2 font in Wasm
  • 06f2d15 chore(deps): upgrade dependencies
  • c8425fd chore(deps): update dependency eslint-plugin-sonarjs to ^0.21.0
  • 716e34e test: using simple SVG files to make testing faster
  • fd07ca5 test: fix test image timeout
  • 2d1c468 chore(deps): update yarn to v3.6.3
  • 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.5.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.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Oct 17, 2023
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Oct 17, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 489a03f
Status: ✅  Deploy successful!
Preview URL: https://80be4ca8.portfolio-c9y.pages.dev
Branch Preview URL: https://dependabot-npm-and-yarn-resv.portfolio-c9y.pages.dev

View logs

@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot Bot commented on behalf of github Oct 23, 2023

Superseded by #48.

@dependabot dependabot Bot closed this Oct 23, 2023
@dependabot dependabot Bot deleted the dependabot/npm_and_yarn/resvg/resvg-js-2.5.0 branch October 23, 2023 05:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants