Skip to content

Generate binary font files (.otf, .woff, .eot) #12

@louisremi

Description

@louisremi

Generating binary font files such as .otf is hard! It's not like anything we've done so far. Here is what we know:

  • It should be possible to generate "svg opentype" fonts (firefox only) using the js files of this project: https://github.com/rocallahan/svg-opentype-workshop The only problem is that the CmapTable.js file looks incomplete, and it's required to generate a font without using an existing one that already has a complete cmap.
  • fontforge can be used as a command-line tool to generate .otf and other binary formats files from svg sources. The challenge is to compile it using emscripten in order to do that right in the browser. The command lines "API" (see http://fontforge.org/cliargs.html ) uses scripts that can be written either in python or in a specific language (see http://fontforge.org/scripting-tutorial.html ).
  • It should be relatively easy to generate ttx with cff outlines files by studying the documentation and some example files, see https://github.com/behdad/fonttools Hinting looks slightly more complex. But .ttx isn't very useful: it has been replaced by UFO, and .svg fonts can also be converted to .otf using fontforge.
  • There's a JS lib able to read outlines from OpenType fonts with TrueType outlines: https://github.com/nodebox/opentype.js There's also a cff branch that should soon add support for PostScript outlines (the only ones interesting to us). We contacted him via Twitter and he said font creation was on the roadmap. This looks like a very promising long-term solution and we should do what we can to help it happen.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions