Closed alexgleason closed 1 month ago
This method should exist: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillText
And it looks like it does exist: https://jsr.io/@gfx/canvas/0.5.6/src/context2d.ts#L307
So I'm not sure what is wrong.
I think it's because I'm spreading the ctx because I was trying to work around https://github.com/DjDeveloperr/deno-canvas/issues/40 in the wasm library before
Changing this:
- const ctx = { ...canvas.getContext('2d'), canvas } as unknown as CanvasRenderingContext2D;
+ const ctx = canvas.getContext('2d') as unknown as CanvasRenderingContext2D;
Seems like the right thing to do, after I looked at the source and noticed all the getter and setters. But then I get this:
root@ubuntu-s-1vcpu-512mb-10gb-nyc1-01:~# deno run -A --unstable-ffi captcha.ts
free(): invalid pointer
Aborted (core dumped)
:smiley:
EDIT: opened #68
I finally got past https://github.com/DjDeveloperr/skia_canvas/issues/66 by upgrading to Ubuntu 24.04
Now I'm facing another issue when trying to use
npm:captcha-canvas@4.0.0
:Here is my reproduction script: