Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Mirror basic nodecanvas interface #123

Open
asturur opened this issue Jan 7, 2021 · 4 comments
Open

Proposal: Mirror basic nodecanvas interface #123

asturur opened this issue Jan 7, 2021 · 4 comments
Assignees

Comments

@asturur
Copy link

asturur commented Jan 7, 2021

Mirroring the basic node-canvas interface, has already done with createCanvas function, could be a great boost to adoption, especially for JSDOM.

@Brooooooklyn
Copy link
Owner

Brooooooklyn commented Jul 13, 2021

@asturur hey, storkeText and fillText are ready now, feel free to play with it. Note the maxWidth and measureText is still in developing.

The maxWidth has been implemented.

@asturur
Copy link
Author

asturur commented Jul 13, 2021

yes i want to resume this test. I see that skia canvas also has been updated, how this package relate to the other? is skia-canvas a dependency of this one?

@Brooooooklyn
Copy link
Owner

Brooooooklyn commented Jul 13, 2021

I see that skia canvas also has been updated, how this package relate to the other? is skia-canvas a dependency of this one?

No, skia-canvas is depended on rust-skia, another skia library created by me.

This project is depended on skia from scratch, because rust-skia was designed for more general usage, like rendering on OpenGL and Vulkan API, modify the build config on it is very complicated. So I started this project and build skia for only offscreen rendering usage, and also without any system dependencies!

The major differences between this project and skia-canvas is:

  1. skia canvas support more features now, because rust-skia has done the most of jobs. But skr-canvs (this project) will provide the same extra features in future if needed.
  2. skr-canvas has 0 system dependencies, so it's out of box solution for docker users. But skia-canvas dependent on fontconfig.
  3. skr-canvas support more platforms and CPU arch. Like I said below, modify the build config of rust-skia is very hard, so skia-canvas now only support linux-x64-gnu windows-x64 macOS-x64 and macOS-arm64. But skr-canvas support more wildly used platforms and CPU arch. Like linux-x64-musl which is very import for node:lts-apline users, and linux-arm64-gnu and linux-arm64-musl, which is important for users who is using m1 chip macOS with docker.

@Brooooooklyn
Copy link
Owner

And this project is dependent on skia directly, so the performance is better than the other implementations: https://github.com/Brooooooklyn/canvas#performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants