Open Brooooooklyn opened 3 years ago
seems missing 'measureFont' ?
seems missing "filter"
@ap0sentada filter
was implemented
can you please implement a deregisterFont method?
the <context>.fillStyle = "rgba(0,0,0,0.4)"
)
missing
<context>.letterSpacing: number
Missing
CanvasRenderingContext2D.fontStretch: 'ultra-condensed' | 'extra-condensed' | 'condensed' | 'semi-condensed' | 'normal' | 'semi-expanded' | 'expanded' | 'extra-expanded' | 'ultra-expanded'
Help ne! When I install Termux on Android, I get the following error: /storage/emulated/0/morsel_bot/node_modules/@napi-rs/canvas/js-binding.js:216 throw loadError ^
Error: dlopen failed: library "/storage/emulated/0/morsel_bot/node_modules/@napi-rs/canvas-android-arm64/skia.android-arm64.node" needed or dlopened by "/data/data/com.termux/files/usr/bin/node" is not accessible for the namespace "(default)"
at Module._extensions..node (node:internal/modules/cjs/loader:1454:18)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Module.require (node:internal/modules/cjs/loader:1233:19)
at require (node:internal/modules/helpers:179:18)
at Object.
Node.js v20.15.1 /sdcard/morsel_bot $
Seems the most features are implemented, is there any ETA for the first release version? Thanks.
Since this lib is advertised as a drop in replacement for node-canvas
the roadmap should include for version 0.3 a documentation to reliably use this instead of node-canvas
as a transitive dependency. Certainly using overrides
- not sure how reliable those work in npm
.
Just an FYI this project is already more stable for me than node-canvas
. I was using node-canvas
with pdfjs-dist
to convert PDFs to images. node-canvas
has a bunch of memory management issues and segfaults. even though I was using the API in a very straightforward way.
I dropped in @napi-rs/canvas
and everything pretty much just worked. I am doing the font handling in pdfjs
though and just passing on path commands so I'm not hitting any of that code.
Memory safe languages for the win.
Just an FYI this project is already more stable for me than
node-canvas
. I was usingnode-canvas
withpdfjs-dist
to convert PDFs to images.node-canvas
has a bunch of memory management issues and segfaults. even though I was using the API in a very straightforward way.I dropped in
@napi-rs/canvas
and everything pretty much just worked. I am doing the font handling inpdfjs
though and just passing on path commands so I'm not hitting any of that code.Memory safe languages for the win.
Really very nice info, hopefully there could be a release version soon 👍 😄
0.1. The first usable version
Canvas
CanvasRenderingContext2D
Property
Methods
Path2D
Text rendering
ImageData
Constructor
Property
Image
Property
Methods
0.2. Testing, code cleanup and performance
0.3. API stable, documents
1.0