woff to otf using javascript

I wrote in javascript a small converter of WOFF fonts to OTF format . I don't know if it would be helpful to a lot of people, but it helped me to learn about handling binary data in browsers and to refresh in memory the details of the native drag-n-drop support. Unfortunately both these APIs are not very convenient, but they do their job.

It all started some time ago when I have received Unicode Emoji's several times, and these are not supported by default Ubuntu fonts. Later I saw the article on adding Emoji support to Ubuntu. The proposed solutions didn't look good enough to me, so I decided to download and install some other font for these characters, but only found a WOFF one. To convert it to OTF I used a python script woff2otf and noticed that the code is quite straightforward. However it's not too convenient to download it and to pass files as parameters. Incidentally I recalled that I haven't yet played with Typed Arrays, and haven't done anything about drag-n-dropping files into the webpage. So it was a fun excercise.

Artemy Tregubenko,
, , ,

comments powered by Disqus