1.5.1 ā€¢ Published 10 months ago

orthomoji v1.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Orthomoji

šŸ–‹ļøšŸ˜„ Orthography + Emojis šŸ˜„šŸ–‹ļø Create image-based messages with emojis!

Orthomoji

Installation

NOTE: This package requires Node 16.20.1. You may encounter errors if you use another version!

You may install Orthomoji using NPM:

// From NPM directly
npm install orthomoji --save

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

How to use

First, you will need to use an instance of the Orthomoji object

import { Orthomoji } from 'orthomoji';

const orthomoji = new Orthomoji(); 

Once the above is done, simply chain some functions to generate an image!

// 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:

FunctionMandatoryDescription
setTextYesSets the text that will be emojified into an image
setEmojiYesSets the emoji to use to make letters
setEmojiSizeNoSets the font size of the emojis
setBackgroundStyleNoSets the color or style of the image background
setBorderNoSets the width and color of the image border
setSpaceEmojiNoSets the emoji to use for letter whitespace
setPNGCompressionLevelNoSets the level of compression to the generate image
generateYesGenerates 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

setPNGCompressionLevel

level: Number - PNG compression level between 0 and 9. 0 means minimal compression while 9 is maximum compression

generate

destination: String - Destination path to save final image to

License

This work is licensed under MIT

1.5.1

10 months ago

1.5.0

10 months ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago