satori 0.0.43 → 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.wasm.cjs +9 -9
- package/dist/index.wasm.cjs.map +1 -1
- package/dist/index.wasm.js +9 -9
- package/dist/index.wasm.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/index.js +0 -12687
- package/dist/esm/index.js.LEGAL.txt +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.wasm.js +0 -12686
- package/dist/esm/index.wasm.js.LEGAL.txt +0 -1
- package/dist/esm/index.wasm.js.map +0 -1
package/README.md
CHANGED
|
@@ -335,6 +335,14 @@ init(yoga)
|
|
|
335
335
|
await satori(...)
|
|
336
336
|
```
|
|
337
337
|
|
|
338
|
+
When running in the browser or in the Node.js environment, WASM files need to be hosted and fetched before initializing. asm.js can be bundled together with the lib. In this case WASM should be faster.
|
|
339
|
+
|
|
340
|
+
When running on the Node.js server, native modules should be faster. However there are Node.js environments where native modules are not supported (e.g. StackBlitz's WebContainers), or other JS runtimes that support WASM (e.g. Vercel's Edge Runtime, Cloudflare Workers, or Deno).
|
|
341
|
+
|
|
342
|
+
Additionally, there are other difference between asm.js, native and WASM, such as security and compatibility.
|
|
343
|
+
|
|
344
|
+
Overall there are many trade-offs between each choice, and it's better to pick the one that works the best for your use case.
|
|
345
|
+
|
|
338
346
|
### Font Embedding
|
|
339
347
|
|
|
340
348
|
By default, Satori renders the text as `<path>` in SVG, instead of `<text>`. That means it embeds the font path data as inlined information, so succeeding processes (e.g. render the SVG on another platform) don’t need to deal with font files anymore.
|