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
I too have this problem.
canvas: 1.2.2
cairo: 1.14.2
libpng: stable 1.6.17 (bottled)
fontconfig: stable 2.11.1 (bottled)
pixman: stable 0.32.6 (bottled)
freetype: stable 2.5.5 (bottled)
... as above
and without pango.
With pango my custom font wouldn't render.
Interestingly enough my custom font renders the expected size whereas Arial did as above - enormous and all characters of top of each other. In this screen shot the dashes on the grid are from my custom font size 18px and the numbers down the sides are supposed to be 10px Arial.
I believe this started happening somewhere after node-canvas v1.1.6.
We have the latest versions of all the dependencies but maybe that is not what we need?
If not please advise on a set of compatible versions.
Same problem here, letters are overlapping (looks like a wrong kerning)
canvas 1.2.0 (up to 1.2.3)
node 0.12.4
Ubuntu 14.04.2
No problems with canvas version 1.1.6
I use Mac and fabric. Problem with fonts solving as add fonts definition in code. On linux all ok, but fabric on Mac require definition font.
canvas.contextTop.addFont(font);
Same problem here (Mac OS X 10.10.5). After removing pango (homebrew), reinstalling cairo (homebrew) and reinstalling canvas (npm), everything worked fine again. The "custom-font-workaround" didn't work for me.
Thank you for this advice! Had exactly the same problems: After removing pango (homebrew), reinstalling cairo (homebrew) and reinstalling canvas (npm), everything worked fine again.
Activity
ssured commentedon Apr 24, 2015
I'm having the same problem, no solution found...
wavded commentedon Apr 24, 2015
I have the same problem.... same code ran against Ubuntu 14.04 cairo setup is fine but Mac is hosed.
jacquie commentedon May 1, 2015
I too have this problem.
canvas: 1.2.2
cairo: 1.14.2
libpng: stable 1.6.17 (bottled)
fontconfig: stable 2.11.1 (bottled)
pixman: stable 0.32.6 (bottled)
freetype: stable 2.5.5 (bottled)
... as above
and without pango.
With pango my custom font wouldn't render.
Interestingly enough my custom font renders the expected size whereas Arial did as above - enormous and all characters of top of each other. In this screen shot the dashes on the grid are from my custom font size 18px and the numbers down the sides are supposed to be 10px Arial.

I believe this started happening somewhere after node-canvas v1.1.6.
We have the latest versions of all the dependencies but maybe that is not what we need?
If not please advise on a set of compatible versions.
matthias-w commentedon May 27, 2015
Same problem here, letters are overlapping (looks like a wrong kerning)
canvas 1.2.0 (up to 1.2.3)
node 0.12.4
Ubuntu 14.04.2
No problems with canvas version 1.1.6
[-]Invalid text render on OSX[/-][+]Invalid text render[/+]kepeterson commentedon Jun 19, 2015
I'm having the same problem -- going back to canvas version 1.1.6 didn't fix it either. Anyone having any luck?
OS X
node 0.12.2 / io.js 2.3.0
canvas >= 1.1.6
RWizard commentedon Jun 19, 2015
Please, try it:
var canvas = fabric.createCanvasForNode(..., ...)
font = new canvas.Font('ACLine', __dirname + 'ACLineRegular.ttf');
font.addFace(__dirname + 'ACLineRegular.ttf', 'normal');
canvas.contextTop.addFont(font);
kepeterson commentedon Jun 22, 2015
Using fabric.js as mentioned above I still have weird behavior:
generated by:
RWizard commentedon Jun 22, 2015
I use Mac and fabric. Problem with fonts solving as add fonts definition in code. On linux all ok, but fabric on Mac require definition font.
canvas.contextTop.addFont(font);
LinusU commentedon Jul 2, 2015
I have this problem as well when installed without pango. The following workaround works for me:
sebastian-schmitt commentedon Sep 8, 2015
Same problem here (Mac OS X 10.10.5). After removing pango (homebrew), reinstalling cairo (homebrew) and reinstalling canvas (npm), everything worked fine again. The "custom-font-workaround" didn't work for me.
tpisto commentedon Nov 25, 2015
Thank you for this advice! Had exactly the same problems: After removing pango (homebrew), reinstalling cairo (homebrew) and reinstalling canvas (npm), everything worked fine again.
LinusU commentedon Nov 26, 2015
Should probably be fixed by #628, should we choose to merge that...
jimmywarting commentedon Dec 15, 2015
Same problem here on mac