Skip to content

๐Ÿ“š Ultimate Emoji Generator library for Swift

License

Notifications You must be signed in to change notification settings

YutoMizutani/EmojiKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

EmojiKit

Swift MIT License Swift Package Manager compatible

๐Ÿ“š Ultimate Emoji Generator library for Swift

EmojiKit

Requirements

Swift 5.1 Python 3.7

Install

mint install YutoMizutani/[email protected]

Install

make install

Make

$ git clone https://github.com/YutoMizutani/EmojiKit.git
$ cd EmojiKit
$ make

Swift Package Manager

Use as CLI

$ git clone https://github.com/YutoMizutani/EmojiKit.git
$ cd EmojiKit
$ make build
$ .build/debug/emojigen <text> <output>

Use as dependency

Add the following dependency to your Package.swift manifest:

.package(url: "https://github.com/YutoMizutani/EmojiKit.git", .upToNextMinor(from: "1.2.0"),

And then import wherever needed: import EmojiKit

Usage

emojigen <text> <output>

mint.png

Example

import EmojiKit

EmojiKit().generate(
    "็ตตๆ–‡\nๅญ—ใ€‚",
    imagePath: "out/emoji.png",
    textAlignment: .left,
    fontPath: "static/NotoSansMonoCJKjp-Bold.otf"
)

More usages

Parameters

Key Description
text Emoji text
width Output image width
height Output image height
imagePath Output image path
textColor Text color as 0xAARRGGBB
backgroundColor Background color as 0xAARRGGBB
textAlignment Text alignment
isSizeFixed Text size fixed
isEnabledStretch Text stretch
fontPath Font file path
format Image format
quality Image quality

More details and parameters are to see emoji-gen/emojilib and emoji-gen/libemoji

License

EmojiKit is released under the MIT License.