Overview
Generate font atlases with @uno.build/fonts.
@uno.build/fonts is a WebAssembly (WASM) version of
msdf-atlas-gen. It runs the original C++
generator compiled to WASM through a Node.js CLI.
Quick start
With Node.js 8.0.0 or later and npm installed, generate an atlas and its layout from a local font file:
npx @uno.build/fonts font.ttfThis generates font.png and font.json using the default mtsdfx atlas type.
This is equivalent to specifying the defaults explicitly:
npx @uno.build/fonts \
-font font.ttf \
-imageout font.png \
-json font.json \
-type mtsdfx \
-size 64 \
-pxrange 16 \
-effectpxrange 32 \
-chars "[0x20, 0x7e]" \
-format pngNext steps
- CLI options: inputs, outputs, character selection, and atlas settings.
- MTSDFX: separate distance ranges for text edges and effects.
- Texts & Fonts: load and use an atlas in uno UI.
For development instructions and third-party licenses, see the fonts repository.