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
.
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/