Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yutomizutani/emojikit
ð Ultimate Emoji Generator library for Swift
https://github.com/yutomizutani/emojikit
emoji emoji-gen swift swift-package-manager swift5
Last synced: 3 months ago
JSON representation
ð Ultimate Emoji Generator library for Swift
- Host: GitHub
- URL: https://github.com/yutomizutani/emojikit
- Owner: YutoMizutani
- License: mit
- Created: 2019-08-07T12:39:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T13:23:47.000Z (over 4 years ago)
- Last Synced: 2024-09-16T02:31:36.107Z (4 months ago)
- Topics: emoji, emoji-gen, swift, swift-package-manager, swift5
- Language: Swift
- Size: 13.5 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EmojiKit
![Swift](https://img.shields.io/badge/Swift-5.1-orange.svg)
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/YutoMizutani/OperantKit/blob/master/LICENSE)
[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)ð Ultimate Emoji Generator library for Swift
## Requirements
Swift 5.1
Python 3.7## Install
### [Mint](https://github.com/yonaskolb/mint)
```sh
mint install YutoMizutani/[email protected]
```### Install
```
make install
```### Make
```sh
$ git clone https://github.com/YutoMizutani/EmojiKit.git
$ cd EmojiKit
$ make
```### Swift Package Manager
**Use as CLI**
```sh
$ git clone https://github.com/YutoMizutani/EmojiKit.git
$ cd EmojiKit
$ make build
$ .build/debug/emojigen
```**Use as dependency**
Add the following dependency to your Package.swift manifest:
```swift
.package(url: "https://github.com/YutoMizutani/EmojiKit.git", .upToNextMinor(from: "1.2.0"),
```And then import wherever needed: `import EmojiKit`
## Usage
```
emojigen
```![mint.png](static/mint.png)
## Example
```swift
import EmojiKitEmojiKit().generate(
"çµµæ\nåã",
imagePath: "out/emoji.png",
textAlignment: .left,
fontPath: "static/NotoSansMonoCJKjp-Bold.otf"
)
```More usages
- Slack Emoji generator: https://github.com/YutoMizutani/SlackPet#slack-emoji-%E4%BD%9C%E6%88%90## 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](https://github.com/emoji-gen/emojilib) and [emoji-gen/libemoji](https://github.com/emoji-gen/libemoji)
## License
EmojiKit is released under the [MIT License](https://github.com/YutoMizutani/EmojiKit/blob/master/LICENSE).