Open chase opened 9 years ago
Unsure exactly what it is you want to do? :smile:
Opentype.js is for font manipulation as far as I can see and since we're already zip'ing when building what would we need on-the-fly zipping for?
I was thinking: What if rather than building all the options before hand, we only host the original TTF files (Normal, Bold, Oblique, Retina) and then do the small option modifications in the browser? Think fontbuilder.py
in your browser for exactly what you picked (ex. it changes each style of the family) then zips them up.
Ah - that would be cool - would allow for an infinite amount of alternates. But that would require the website being hosted on a proper web server with python capabilities, right?
Nope! That's the beauty of this solution, everything is still static (we still build the base fonts using CircleCI) but all (or most) of the customization options would be implemented on the client-side browser. Opentype.js allows manipulation and writing of TTF blobs in the browser, no server needed.
It lacks some capabilities, but I'll have to check if it discards things like CALT/LIGA tables entirely on loading. If it doesn't, we could build the nocalt
option in CircleCI and just switch to those base fonts for Contextual Alternates / No Contextual Alternates
option. If it does, I can probably work out a hack.
What Opentype.js definitely can do:
Wow - that sounds powerful and definitely cool to have. I'm afraid my schedule is quite packed for the next month or so I won't have time to really look into until then but if it's something you'd want to look into then by all means 🚀😎
I assigned myself to it, no need to do anything on your end. I'm pretty busy so this project is probably for post v1.0. This is more a reminder to check out this approach later on.
So this may be a better alternative to opentype.js: https://github.com/kekee000/fonteditor-core
I'll have to investigate some more, but it seems like it may support everything we'd need.
Looking forward to this.
Opentype: https://github.com/nodebox/opentype.js
Doesn't support kerningNow it does!Zips: https://gildas-lormeau.github.io/zip.js/core-api.html#zip-writing https://stuk.github.io/jszip/documentation/examples.html