I would like to know how to get a name of the font I installed to pass to HTML5 canvas context to set the font.
I am using node-canvas, and trying to set a font to unleanred.
After downloading and installing the font, I tried this to set the font:
var canvas = new Canvas(370, 120)
, ctx = canvas.getContext('2d');
ctx.font = 'bold 30px unlearned';
ctx.fillText('foo', 25, 45);
But the font remains unchanged in the output. When I download some other fonts, say drafting, and install it, the above works.
So I think the problem is that I am using a wrong name to reference the font. How can I get the correct name and type?