You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Thanks for the repro. The issue happens if you have Pango > 1.47.0 and you call registerFont with the same family name and a different font file. I forgot about another part of the code when I wrote #1987 that tries to support doing that (not well). Working on a fix.
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: