3 ms·
Opentype.js: read and write OpenType fonts using JavaScript
- oatmealsnap 10y agoNeat. Although the rendered text isn't screen-reader accessible. An aria-label with the text content would solve this, though.
- voltagex_ 10y agoDefinitely raise an issue: https://github.com/nodebox/opentype.js/issues https://github.com/nodebox/opentype.js/issues
- jongold 10y agoExcellent library - I used it to do some super fun things last year http://jon.gold/2016/05/robot-design-school/ http://jon.gold/2016/05/robot-design-school/
- IvanK_net 10y agoBy the way, OpenType.js has problems with parsing many fonts (old structures of TTF tables) and also with rendering some OTF (CCF) glyphs. If you are looking for a more versatile library, I recommend using Typr.js https://github.com/photopea/Typr.js https://github.com/photopea/Typr.js
- kevinb7 10y agoTypr.js doesn't seem to have a way to write out fonts after editing them. In what way is it more versatile?
- IvanK_net 10y agoYou mean writing a font back into a font file? Yes, this feature is not available now. OpenType.js throws errors for many font files. It supports just a specific subset of standard font structures. It also renders some glyphs incorrectly. Typr.js does not have these problems (at least not during my testing).