Closed BURROO closed 2 years ago
Variable font are not supported by opentype.js
Thank you! Seeing that you are involved in the project, do you know if there is support for variable planed eventually or could you point me to any other tools/resources that could parse/write variable fonts in a similar matter as opentype.js?
I was personally interested in the matter, so I started reading the OTF spec and tried to implement it but I got overwhelmed but the number of table needed.
Also OpentypeJS use the CFF table for defining it glyph shape. But the spec explicitly state that:
variations for outlines using the (Compact Font Format version 1.0 ('CFF ') table are not supported.
So it would also require OpentypeJS to migrate to CFF2 or some less-compact table declaration to be able to use font variation feature.
But anybody could do send a PR to change that. So no ETA for now :)
No idea about other tools, but I use ttx to help me dump OTF to XML in order to understand them.
Closing, as it's not going to be implemented anytime soon :/
I am curious if it is possible to load a variable font file and generate all its associated styles as a buffer and eventually create files (otf, woff2, etc) from them. Since all the information from each of those styles is already available in the variable font this should easily be possible, right? What would be the best approach to approach this or is there a function included that helps for example with creating the dataset for each glyph of the associated style?