Import a font to use it with node-canvas

Hi @Charbelim, first of all, it can not be a URL. You must include the font directly into your project. You can do so by using git.

Looking at Node-Canvas you have to register your font using registerFont().

For example:

const { registerFont, createCanvas } = require('canvas')
registerFont('comicsans.ttf', { family: 'Comic Sans' })

const canvas = createCanvas(500, 500)
const ctx = canvas.getContext('2d')

ctx.font = '12px "Comic Sans"'
ctx.fillText('Everyone hates this font :(', 250, 10)