The following OpenType tables are currently supported:
This roughly corresponds to all the metadata available in most fonts. Future versions of this library will probably support parsing the actual font data (pull requests welcome!).
Use Grunt to compile a minimized versions:
build/opentype.js into your page and pass the
opentype.parse method an
var buffer = new ArrayBuffer(...); var font = opentype.parse(buffer);
font variable will now contain a JSON representation of all supported OpenType tables. Later versions of this library will support parsing only select OpenType tables.
This library extensively uses
DataView's so you will need a browser that supports those. Any recent version of Chrome or Firefox will do.
This library is licensed under the three-clause BSD license. Copyright 2013 Bram Stein. All rights reserved.