Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
louisremi opened this issue Jun 7, 2013 · 3 comments
Closed

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

louisremi opened this issue Jun 7, 2013 · 3 comments
Milestone

Comments

@louisremi
Copy link
Contributor

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.
@davelab6
Copy link

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.

Is that an issue for v1, because there is a known character set?

@davelab6
Copy link

.ttx isn't very useful: it has been replaced by UFO,

That seems like a strange way to view their relation to me :) As I understand it:

TTX is the XML serialization of the fontTools python object model, which represents binary SFNT data (typically TrueType and OpenType SFNTs, but also VTT and maybe others)

UFO is the XML serialization of the RoboFab python object model, which represents font source data

UFO can be compiled into TTX. In theory, since they are both XML, this could be done in-browser with XSL, but I don't know how fast that would be... The only 2 compilers that I am aware of are written in C, FontForge and the Adobe FDK. There's also https://github.com/typesupply/ufo2fdk which can also translate the UFO XML into a Adobe PostScript Type 1 font, to be run through the FDK.

@yannickmathey yannickmathey added this to the v1.0 milestone Apr 9, 2015
@louisremi
Copy link
Contributor Author

Closing this issue as we now export to .otf
Support for other binary files such as woff and support for UFO/XML is a different problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants