Releases: thx/resvg-js
v2.0.0-alpha.0
resvg-js now supports WebAssembly. 🎉 What can I do now?
- You can convert SVG to PNG in the browser or Web Worker.
- We provide Playground for direct use: https://resvg-js.vercel.app
With WebAssembly, resvg-js gains broader cross-platform compatibility, all by loading only about 2MB of WASM files. And, the API is consistent with the Node.js side.
The current version of WASM does not support loading fonts, so please submit an issue if you have a request.
What's Changed
- feat: support wasm32 target via wasm-bindgen by @zimond in #51
- feat: build wasm package by @yisibl in #62
- feat: playground can now run in browsers that do not support top await by @yisibl in #57
- feat: upgrade resvg to 0.21.0 by @yisibl in #59
- feat: upgrade to napi-rs 2.1.0 by @yisibl in #60
- chore: improved error message when output PNG size is 0 by @yisibl in #58
- doc: add wasm usage documentation by @yisibl in #63
New Contributors
Full Changelog: v1.4.0...v2.0.0-alpha.0
v1.4.0
v1.3.0
1.3.0 - 2022-01-02
Added
- feat: upgrade to resvg 0.20.0(tiny-skia to 0.6.2).
- chore: add oslllo-svg2 to the examples and bench.
v1.2.0
1.2.0 - 2021-12-25
Added
- feat: upgrading to napi-rs v2.
- feat: support Android armv7(@resvg/resvg-js-android-arm-eabi).
Changed
- fix:
default_font_family
changed fromTimes New Roman
toArial
.
This is closer to the default rendering font in the browser.
v1.1.0
Added
-
feat: implement
renderAsync()
function. By @BrooooooklynWe have made a major upgrade to napi-rs, from v1 to 2.x alpha. This allows better support for asynchronous binding and automatic generation of TypeScript definitions. Now you can enjoy
async/await
.The
allocator
is also enabled, which gives a small performanceh boost.const { renderAsync } = require('@resvg/resvg-js') async function main() { const pngData = await renderAsync(/* SVG string or buffer */) }
-
feat: The input to the
render()
andrenderAsync()
functions supports buffer. -
feat: improved webpack support, no more need
@node-rs/helper
dependency.The
@node-rs/helper
is convenient to load native binary cross platform and cpu arch. But it's not friendly towebpack
,vercel/nft
andvercel/ncc
because the logic is too dynamic. -
feat: add
example/compare.js
.
Changed
- fix: the default font no longer throws an error if it is not found, it changes to a warning.
- chore: benchmark adds tests for svg icons and other improvements.
- chore: upgrade Rust Edition to 2021.
v1.0.4
1.0.4
v1.0.3
1.0.3
v1.0.2
1.0.2
v1.0.1
1.0.1
v1.0.0
1.0.0