-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
2.9.1 fails to load the correct weights in the same font family #2041
Labels
Comments
I can confirm this is occurring for me too, as well as font family in registerFont not working. |
Thanks for the repro. The issue happens if you have Pango > 1.47.0 and you call |
This was referenced Jun 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue or Feature
When loading multiple font weights in the same font family, node-canvas 2.9.1 fails to render the correct font weight. This issue did not occur in 2.9.0.
I'm loading four styles of the free "Open Sans" font family: Light (300), Regular (400), Bold (700), and Extra Bold (800). When trying to render text in Regular and Extra Bold as follows, 2.9.1 seems to instead render in Light and Regular, respectively:
Steps to Reproduce
I've created a barebones reproducible project, adapted from my actual project.
Running
node index.js
will generate an image named "canvas.png" in the same directory.Project attached here: repro.zip
The following is how 2.9.1 incorrectly renders the example:
And how 2.9.0 correctly renders the example:
Your Environment
npm list canvas
oryarn list canvas
): 2.9.1The text was updated successfully, but these errors were encountered: