photopea / Typr.js

Typr.js - process fonts in Javascript
MIT License
914 stars 73 forks source link

can add support for WOFF2 #44

Closed zhang65681109 closed 1 year ago

zhang65681109 commented 2 years ago

WOFF2 is now at Candidate Recommendation stage and is widely supported by the most popular browsers

photopea commented 1 year ago

I think the WOFF2 is just a wrapper around OTF, where the OTF tables are compressed with the Brotli algorithm.

It would require including the Brotli decompressor to Typr.js, which might be even larger than the Typr.js itself, so it will get quite messy.

I would rather not implement it. I am sure everyone who provides a WOFF2 font also provides the OTF version of that font, too.