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
{{ message }}
Repository navigation
Tried to upgrade from 1.1.6 to 1.2.3, font sizes are broken. #561
I've noticed this as well. It might be have something to do with the use of an external font.
If you try c.font = "18px Arial"; font size will work. It looks like if it fails to parse any part of the font string (such as font-family), it discards the entire action of setting weight, size, and font-family.
I'm getting a different behavior running font.js. I'm also getting odd behavior running text.js where the letters all overlap. It looks like cairo was updated in March, so I'm wondering if that has anything to do with the font issues.
Edit: I'm on OSX 10.10.3 with all tests passing:
> canvas@1.2.3 test /Users/justin/dev/them/node/node-canvas
> make test
canvas: 1.2.3
cairo: 1.14.2
․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․․
36 passing (32ms)
I'm having the same problem with canvas 1.2.3, or a very similar one. With cairo 1.14.2, and node 0.12.4 (both installed with Homebrew) on 10.10.3, I get this for text.js:
Activity
bmv437 commentedon Jun 5, 2015
I've noticed this as well. It might be have something to do with the use of an external font.
If you try
c.font = "18px Arial";font size will work. It looks like if it fails to parse any part of the font string (such as font-family), it discards the entire action of setting weight, size, and font-family.The fonts example located at:
https://github.com/Automattic/node-canvas/blob/master/examples/font.js
is broken.
font.js example working in 1.1.6:

font.js example broken in 1.2.3:

I've tried on a mac and on an ubuntu linux machine with the same result
caged commentedon Jun 19, 2015
I'm getting a different behavior running font.js. I'm also getting odd behavior running text.js where the letters all overlap. It looks like cairo was updated in March, so I'm wondering if that has anything to do with the font issues.
Edit: I'm on OSX 10.10.3 with all tests passing:
dunn commentedon Jun 20, 2015
I'm having the same problem with canvas 1.2.3, or a very similar one. With cairo 1.14.2, and node 0.12.4 (both installed with Homebrew) on 10.10.3, I get this for

text.js:and this for

font.js:LinusU commentedon Jan 11, 2019
The text backend has been reworked in 2.x, could you please try with that version and reopen if the issue persists, thanks☺️