Skip to content

Multi-channel signed distance field generator, adapted for WASM

Notifications You must be signed in to change notification settings

enso-org/msdfgen-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/