Code Monkey home page Code Monkey logo

libemoji's Introduction

libemoji

Build Status wercker status License

🎉 Ultimate Emoji Generator library using Skia

libemoji

System requirements

  • CMake
  • Python 2.7
  • C11 Compiler
  • C++14 Compiler

Officially supported platforms

We officially support building and running on these platforms below, but you can try it on other platforms.

  • macOS 10.14 Mojave
  • macOS 10.15 Catalina
  • Debian 10 Buster

macOS

When you build this on macOS, please run the commands below before building.

$ brew install cmake

Debian 10 Buster

When you build this on Debian 10 Buster, please run the commands below before building. And, they probably work as well on other Debian versions.

$ sudo apt-get update
$ sudo apt-get install git cmake g++ python libfontconfig1-dev \
    libx11-dev libxcomposite-dev libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev -y

How to build

$ git submodule update --init
$ cmake .
$ make

Example

#include <stdio.h>
#include <string.h>

#include "emoji.h"

int main(void) {
    EgGenerateParams params;
    memset(&params, 0, sizeof(params));
    params.fText = "絵文\n字。";
    params.fWidth = 256;
    params.fHeight = 256;

    EgGenerateResult result;
    if (emoji_generate(&params, &result) != EG_OK) {
        emoji_free(&result);
        return -1;
    }

    FILE *fp = fopen("./emoji.png", "w");
    fwrite(result.fData, result.fSize, 1, fp);
    fclose(fp);

    emoji_free(&result);
    return 0;
}

See also example directory.

Development

Run formatter

$ clang-format --version
clang-format version 9.0.0 (tags/google/stable/2019-05-14)

$ clang-format -i -style=file src/*.cpp src/*.h

See also

License

MIT © Emoji Generator

libemoji's People

Contributors

pine avatar hideki0403 avatar oyakodon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.