Home

Awesome

fontpath

experimental

A tool which generates paths and kerning data from a TTF/OTF/WOFF/etc font. The paths can then be decomposed into points, or rendered to a canvas, or triangulated.

The project is similar to typeface.js and cufon. Both of those tools are very old, and were made before @font-face gained widespread support. This project has a few different goals in mind:

example

fontpath myfont.ttf -o mfont.json --size 128

The default size is 12 pt, but exporting with a higher font size will give you better resolution when rendering the path at large sizes. It's best to match the exported size to the final rendered size, as it will produce better rounding when scaled down.

roadmap

This project is a heavy WIP. Some things I want to explore:

New modules will be added to text-modules.

demos

modules

Note: New modules will be more generic and not specifically tied to "fontpath." See text-modules.

The framework is split into many small modules. Some of them aren't specific to fontpath, but are useful alongside it. You generally won't need to use all of them together; but instead, you'll pick and choose based on your particular application.

Most commonly, you might want to use a "renderer" which gives you a basic word-wrapper and glyph layout tools.

Some other utilities that make up the ecosystem:

license

MIT