{"repo":"thx/resvg-js","free":true,"listed":false,"github":"https://github.com/thx/resvg-js","clone":"git clone https://github.com/thx/resvg-js.git","description":"A high-performance SVG renderer and toolkit, powered by Rust based resvg and napi-rs.","language":"TypeScript","stars":1974,"topics":["nodejs","rust","wasm","svg"],"license":"MPL-2.0","category":"dev-tools","readme_excerpt":"resvg-js resvg-js is a high-performance SVG renderer and toolkit, powered by Rust based resvg, with Node.js backend using napi-rs, also a pure WebAssembly backend. Please use all lowercase resvg-js when referencing project names. Playground https://resvg-js.vercel.app Features - Fast, safe and zero dependencies, with correct output. - Convert SVG to PNG, includes cropping, scaling and setting the background color. - Support system fonts and custom fonts in SVG text. - v2 : Gets the width and height of the SVG and the generated PNG. - v2 : Support for outputting simplified SVG strings, such as converting shapes(rect, circle, etc) to . - v2 : Support WebAssembly. - v2 : Support to get SVG bounding box and crop according to bounding box. - v2 : Support for loading images of external links in . - No need for node-gyp and postinstall, the .node file has been compiled for you. - Cross-platform support, including Apple M Chips. - Support for running as native addons in Deno. Installation Node.js Browser(Wasm) Docs - Node.js see index.d.ts - Wasm see wasm/index.d.ts Example Node.js Example This example will load Source Han Serif, and then render the SVG to PNG. Deno Example SVG PNG ---------------------------------------- -------------------------------------------- Usage Node.js Bun Starting with Bun 0.8.1, resvg-js can be run directly in Bun without any modification to the JS files, and is fully compatible with the syntax in Node.js. Deno Starting with Deno 1.26.1, there is support","default_branch":null,"files":null,"tree":[],"storefront":"/r/thx","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thx/resvg-js/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}