fillText-for-twemoji-node-canvas
This package adds twemoji to node-canvas.
Highlight
-
Layout that does not collapse
-
Support for newlines
Install
npm install filltext-for-twemoji
Usage
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.
Issues
If you find a bug or problem, please open an issue!
Author
- Github: airRnot1106
- NPM: airrnot1106
- Twitter: @airRnot1106
LICENSE
This project is licensed under the MIT License - see the LICENSE file for details.