generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
measureText() is slightly off #581
Labels
bug
Something isn't working
Comments
same |
Same as me :( |
@nugraizy this font https://fontsgeek.com/fonts/Chevin-Bold is |
done it. sadly doesn't fix the issue |
@nugraizy could you provide a minimal reproducible repo so I can debug it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I've been using canvas cairo backend / node-canvas created by Automattic. And I'm using packages for wraps big/long texts. When using node-canvas it works fine, everything align to the middle. But after using your canvas, it offset are off. And it might be because of value width on measureText() are different compared to node-canvas.
Here is the result when measuring text 'Hello World' :
node-canvas :
@napi-rs/canvas
I'm using 512x512 canvas.
And here I'm using the package canvas-text-wrapper with the options below :
The font I used :
https://fontsgeek.com/fonts/Chevin-Bold
Results :
node-canvas : https://imgur.com/a/gjplLKV
@napi-rs/canvas : https://imgur.com/a/jZ0Rtgi
The text was updated successfully, but these errors were encountered: