node-canvas-with-twemoji
TypeScript icon, indicating that this package has built-in type declarations

0.1.11 • Public • Published

node-canvas-with-twemoji

This is a module that is able to draw emoji on node-canvas.

Installation

$ npm install node-canvas-with-twemoji

npm

Quick Example

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();

image

Dependencies

Licence

node-canvas-with-twemoji

Copyright (c) 2020-2021 cagpie / Shun Kobayashi cagpie@gmail.com

Code licensed under the MIT License: http://opensource.org/licenses/MIT

Package Sidebar

Install

npm i node-canvas-with-twemoji

Weekly Downloads

102

Version

0.1.11

License

MIT

Unpacked Size

10.1 kB

Total Files

10

Last publish

Collaborators

  • cagpie