TTF font to C code converter for the embedded mcufont
font library. The project is based on mcufont encoder https://github.com/mcufont/mcufont/blob/master/encoder/main.cc and WebAssembly.
git clone --recurse-submodules https://github.com/HexRx/mcufont-converter-web.git
Use Emscripten toolchain with docker
docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) -w /src/build emscripten/emsdk emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) -w /src/build emscripten/emsdk emmake make
STACK_SIZE=131072
- requires for recursion function fill_tree_suffixes()
.
ALLOW_MEMORY_GROWTH=1
- handling fonts with a large number of glyphs.
npm run dev
- Starts a dev server at http://localhost:5173/npm run build
- Builds for production, emitting todist/
npm run preview
- Starts a server at http://localhost:4173/ to test production build locally
This project is licensed under the MIT License - see the LICENSE file for details.