# orthomoji-dom

> Create text art with emojis!

Latest version **2.1.0** (published 2023-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install orthomoji-dom
pnpm add orthomoji-dom
yarn add orthomoji-dom
bun add orthomoji-dom
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2023-07-28 |
| First published | 2023-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 40.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Matthew Carvalho-Dagenais |
| Maintainers | mcd-3 |
| Keywords | orthomoji, orthomoji-dom, dom, orthomoji dom, orthomoji web, orthomoji html, orthography, emoji, emoji words, text art |

## Links

- npm: https://www.npmjs.com/package/orthomoji-dom
- Repository: https://github.com/mcd-3/orthomoji-dom
- Homepage: https://github.com/mcd-3/orthomoji-dom#readme
- Issues: https://github.com/mcd-3/orthomoji-dom/issues
- npm.io page: https://npm.io/package/orthomoji-dom

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2023-07-28
- 2.0.1 — 2023-07-28
- 2.0.0 — 2023-07-28
- 1.0.0 — 2023-07-28

## README

# Orthomoji DOM

🖋️😄 **Orthography + Emojis** 😄🖋️</br>
Create image-based messages with emojis!</br>
A fork of [Orthomoji](https://github.com/mcd-3/orthomoji)

![Orthomoji](./assets/orthomoji_title.png)

## Installation
You may install Orthomoji using NPM:
```shell
// From NPM directly
npm install orthomoji-dom --save

// From GitHub
npm install git+https://github.com/mcd-3/orthomoji-dom.git
```

## How to use
First, you will need to use an instance of the Orthomoji object
```js
import { Orthomoji } from 'orthomoji-dom';

// "canvas-id" needs to be the ID of the canvas you want to draw to
const orthomoji = new Orthomoji("canvas-id"); 
```

Once the above is done, simply chain some functions to generate an image!
```js
// Make sure that 'setText' and 'setEmoji' are included otherwise it won't complete.
// Make sure that 'generate' is the final function call in the chain.
orthomoji
    .setText('Hello Orthomoji!')
    .setEmoji('😃')
    .generate('./path-to-store-image/')
```

...and that's it! You can now create an Orthomoji image 🎉

## Functions Overview
Orthomoji provides a few extra options to customize your text:

| Function               | Mandatory | Description                                        |
|:----------------------:|:---------:|:--------------------------------------------------:|
|`setText`               | Yes       | Sets the text that will be emojified into an image |
|`setEmoji`              | Yes       | Sets the emoji to use to make letters              |
|`setEmojiSize`          | No        | Sets the font size of the emojis                   |
|`setBackgroundStyle`    | No        | Sets the color or style of the image background    |
|`setBorder`             | No        | Sets the width and color of the image border       |
|`setSpaceEmoji`         | No        | Sets the emoji to use for letter whitespace        |
|`generate`              | Yes       | Generates an emoji-text image                      |

## Function Parameters
Here is a list of all function paramaters you will need to successfully build an Orthomoji image:

### setText
**text: String** - Message that you want to print. Adding '\n' will create additional rows

### setEmoji
**emoji: String** - Emoji to build the letters out of

### setEmojiSize
**size: Number** - Font size of the emoji used in `setEmoji` and `setSpaceEmoji`. Size in pixels

### setBackgroundStyle
**style: String** - Valid color string used to color the background

### setBorder
**width: Number** - Size (in pixels) for the image border

**color: String** - Valid color to use for the border

### setSpaceEmoji
**emoji: String** - Emoji to use for letter whitespace

### generate
**destination: String** - Destination path to save final image to

## License
This work is licensed under MIT

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