This is a module that is able to draw emoji on node-canvas.
$ npm install node-canvas-with-twemoji
const { createCanvas } = require('canvas');
const { fillTextWithTwemoji } = require('node-canvas-with-twemoji');
async function main () {
const canvas = createCanvas(230, 200);
const context = canvas.getContext('2d');
context.fillStyle = '#000000';
context.font = '30px Arial';
await fillTextWithTwemoji(context, 'canvas😉emoji', 10, 100);
}
main();
Copyright (c) 2020-2021 cagpie / Shun Kobayashi [email protected]
Code licensed under the MIT License: http://opensource.org/licenses/MIT