Automattic / Automattic/node-canvas
Font rendering problem
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
Hi I don't use node-canvas directly, but fabric.js instead. This framework uses node-canvas. I posted a problem in their github repo: https://github.com/fabricjs/fabric.js/issues/5296.
Basically the problem is related to the different way a font is rendered in the frontend and backend.
This is the image I have in my browser (OSX, Chrome).

Black and purple text layers are touching the vertical lines. This is the image once it is rendered with node canvas (Docker, linux image).

As you can see, purple text doesn't touch lines. Black text's right edge doesn't touch either. I have been told that this is due to the way that text is measured in node-canvas. Is there any solution or anything I can do to improve this behaviour?
Thanks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.