Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.15 KB

README.md

File metadata and controls

32 lines (24 loc) · 1.15 KB

Msdfgen Library for Wasm32

This repository contains a copy of msdfgen library (commit 86acea) with its freetype dependency, adapted to webassebly. The changes includes CMakeScripts, exported C API, and other required adjustements.

See this instruction how to use exported functions in JavaScript.

Emscripten libraries loads their environment asynchronously. You must not use any exported function before this initialization is complete. This library provides two js functions for querying initialization state (defined here: isInitialized and addInitializationCb.

Build

You need to have emscripten SDK and cmake installed:

mkdir build
cd build
emconfigure cmake .. # -DCMAKE_BUILD_TYPE=RELEASE
emmake make

The final output is msdfgen_wasm.js file located in build/msdfgen/