v1.0.8
An easy to use module to write text with parsed emojis (supports discord emojis too) in canvas for deno!
Repository
Current version released
4 years ago
Versions
Emoji Canvas
An easy to use module to write text with parsed emojis (supports discord emojis too) in deno-canvas!
Example
import Canvas, { dataURLtoFile, loadImage } from 'https://deno.land/x/canvas@v1.1.3/mod.ts';
import fillTextWithEmoji from "https://raw.githubusercontent.com/Scientific-Guy/emoji-canvas/master/mod.ts";
const canvas = Canvas.MakeCanvas(200, 200);
const ctx = canvas.getContext('2d');
ctx.fillRect(0, 0, 800 - 20, 800 - 20);
ctx.fillStyle = 'white';
ctx.font = '30px monospace';
await fillTextWithEmoji(ctx, 'Hi 🤣', 10, 40);
Deno.writeFileSync("Test.png", dataURLtoFile(canvas.toDataURL()))
And using discord emojis!
await fillTextWithEmoji(ctx, 'Hi <:kek:819597288238088213>', 10, 40);
This package was originally created by @abh80 for node.js!