# discord-emoji-canvas

> A simple to use version of canvas specially meant for discord with custom emojis support!

Latest version **1.4.0** (published 2020-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install discord-emoji-canvas
pnpm add discord-emoji-canvas
yarn add discord-emoji-canvas
bun add discord-emoji-canvas
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2020-08-04 |
| First published | 2020-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Abh80 |
| Maintainers | abh78989 |
| Keywords | discord-canvas, emoji-canvas, discord, custom-emoji-canvas, twemoji-canvas |

## Links

- npm: https://www.npmjs.com/package/discord-emoji-canvas
- Repository: https://github.com/abh80/discord-emoji-canvas
- Homepage: https://github.com/abh80/discord-emoji-canvas#readme
- Issues: https://github.com/abh80/discord-emoji-canvas/issues
- npm.io page: https://npm.io/package/discord-emoji-canvas

## Dependencies (2)

- [canvas](https://npm.io/package/canvas.md) ^2.6.1
- [twemoji-parser](https://npm.io/package/twemoji-parser.md) ^13.0.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.4.0 (latest) — 2020-08-04
- 1.3.0 — 2020-08-04
- 1.2.0 — 2020-08-04
- 1.0.0 — 2020-07-31

## README

# discord-emoji-canvas
An easy to use module for canvas which supports custom emojis of discord!!
# Installing
```bash
npm i discord-emoji-canvas
```
# Getting Started
- Typescript
```ts
import {Canvas,fillWithEmoji} from 'discord-emoji-canvas'
const canvas = Canvas.CreateCanvas(200,200) // creating a canvas
const ctx = canvas.getContext('2d') //context
ctx.fillStyle = '#ffffff' //selecting any color, i can only remember the hex of white x)
await fillWithEmoji(ctx,"hello",20,20) //context,text(supports emoji),x,y
const buffer = canvas.toBuffer()
```
- Javascript
```js
const {Canvas,fillWithEmoji} = require('discord-emoji-canvas')
const canvas = Canvas.CreateCanvas(200,200) // creating a canvas
const ctx = canvas.getContext('2d') //context
ctx.fillStyle = '#ffffff' //selecting any color, i can only remember the hex of white x)
await fillWithEmoji(ctx,"hello",20,20) //context,text(supports emoji),x,y
const buffer = canvas.toBuffer()
```

---
_Source: https://npm.io/package/discord-emoji-canvas · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
