This package adds twemoji to node-canvas.
-
Layout that does not collapse
-
Support for newlines
npm install filltext-for-twemoji
const Canvas = require('canvas');
const { fillText } = require('filltext-for-twemoji');
(async () => {
const canvas = Canvas.createCanvas(300, 200);
const ctx = canvas.getContext('2d');
ctx.font = '40px "sans-serif"';
await fillText(ctx, 'Hello😁twemoji', 15, 110);
})();
The font property is applied, but the textAlign and textBaseline settings are ignored and 'start' and 'alphabetic' are applied respectively. Note that no other settings are supported.
If you find a bug or problem, please open an issue!:bug: In particular, let me know if there are any symbols you can't draw well.
- Github: airRnot1106
- NPM: airrnot1106
- Twitter: @airRnot1106
This project is licensed under the MIT License - see the LICENSE file for details.