Font SDK · JavaScript and WebAssembly

A font engine in one file.

Font generation, in your own code.

It runs in the browser or in Node, with no server, no GPU and nothing sent anywhere.

Numbers in,
font out.

One call compiles a whole TrueType font on the device. About 90 ms and 14 KB: fast enough to follow a slider.

compile.js
import { createEngine } from "@typomat/engine";

const engine = await createEngine({ licenseKey });

const ttf = engine.compile(
  { weight: 118, contrast: 0.92, serif: 0.5, xHeight: 470 },
  { name: "Acme Display" },
);

const face = new FontFace("Acme Display", ttf);
document.fonts.add(await face.load());

Or just
the letters.

Outlines come back as SVG paths with kerning, the same curves as the font. Draw them on your canvas, or put them straight in a design.

outlines.js
// Letters as SVG paths, kerned, ready for a canvas.
const { glyphs } = engine.glyphs({ weight: 170, width: 1.5 }, "Acme");

let x = 0;
for (const glyph of glyphs) {
  draw(glyph.d, x);
  x += glyph.advance + glyph.kern;
}

Made to embed.

On the device
Nothing your users type or make ever leaves their browser, so there's nothing to add to your privacy policy.
Off the main thread
Compile in a worker and a slider never stutters. The engine has no dependencies.
Typed
TypeScript types for all 64 parameters, and a catalog with every range and default for building your own controls.

Good to know

Try it in your product.

Start with the free API trial, or write to Marco about what you're building.