@nzws/libemoji.js
v0.1.0
Published
Unofficial nodejs wrapper for emoji-gen/libemoji
Downloads
2
Readme
@nzws/libemoji.js
Unofficial nodejs wrapper for emoji-gen/libemoji
Original Library
⚠
libemoji.js
is an unofficial library, do not send any questions/issues about this to the original author.
Usage
yarn add @nzws/libemoji.js # or `npm i @nzws/libemoji.js`
import { generate } from '@nzws/libemoji.js';
import { promises } from 'fs';
void (async () => {
const emoji = generate('えも\nじ', {
width: 128,
height: 128,
color: '#1fddffff',
backgroundColor: '#00000000',
textAlign: 'center',
textSizeFixed: false,
disableStretch: false,
typefaceFile: '/path/to/JapaneseFontFile.otf',
typefaceName: '',
format: 'png',
quality: 100
});
await promises.writeFile('./example/emoji.png', emoji.buffer);
})();
Development
Requirements
- Node.js v16
- yarn v2
- CMake
- Python 2.7 (recommend to use asdf)
- C11 Compiler
- C++14 Compiler
Initialize
# Initialize
asdf install python 2.7.18
sudo apt install clang-format # for linux
SKIP_BUILD=true yarn
yarn setup