Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://pomax.github.io/CFF-glyphlet-fonts/

Making tiny fonts, because making tiny fonts.
https://pomax.github.io/CFF-glyphlet-fonts/

Last synced: 28 days ago
JSON representation

Making tiny fonts, because making tiny fonts.

Awesome Lists containing this project

README

        

The aim of this repo is to create a small JavaScript thing that
can turn outline data for "a letter" into a tiny OpenType font
using CFF for the glyph model (because CFF does Type2 charstrings,
which model curves with cubic beziers, unlike TFF, which can only
do quadratic beziers. Which are properly nonsense for design work).

The idea is to supply the builder function with a structure similar
to an SVG (compound) path, and get a BASE64-encoded OTF back for
use in an @font-face src property. Define outline, load in, apply
to single letter.

The code can be built with `node r.js -o build` (windows users will
probably need to do something stupid like `node c:\Users\YourNameHere\AppData\Roaming\npm\node_modules\requirejs\bin\r.js -o build.js`
because r.js was not packaged as nicely as npm or browserify)

Why is this useful? What a silly question.

- Pomax

live version: http://pomax.github.io/CFF-glyphlet-fonts

PS: this code is public domain, except in jurisdictions that do not
recognise the concept of a public domain. For these jurisdictions,
the license is an "MIT with the overruling stipulation that the
code is still public domain outside your judicial borders".