Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: load woff fonts #7

Closed
adriaanmeuris opened this issue Jan 23, 2017 · 9 comments
Closed

Feature: load woff fonts #7

adriaanmeuris opened this issue Jan 23, 2017 · 9 comments

Comments

@adriaanmeuris
Copy link

I'm working on the multiline feature (#6), but I was wondering if there's any chance of parsing woff-fonts.

If not, is it an idea to use the woff-parsing of opentype, or would I lose better font support like stated in opentypejs/opentype.js#214?

@photopea
Copy link
Owner

A Woff file is just a zipped OTF file. After you unzip it, you can use Typr.js to work with that file.

I am afraid that if I add unzipping algorithms into Typr.js, it may become four times larger.

@adriaanmeuris
Copy link
Author

No problem, just looking into how I could parse it myself. Would https://github.com/andyjansson/woff-parser be a good start?

@photopea
Copy link
Owner

That library looks like it needs Node.js environment, I am not sure if you can run it at client side.

I would look into WOFF file specification first, then unzipped it with a ZIP library to get a OTF file.

@adriaanmeuris
Copy link
Author

alright, thanks for your tips!

@dhowe
Copy link

dhowe commented Dec 5, 2024

Any solution on this one @adriaanmeuris ? Looking to do the same here...

@photopea
Copy link
Owner

photopea commented Dec 5, 2024

I have already implemented the support for WOFF into Typr.js, it will be published here on github within the next two weeks.

@dhowe
Copy link

dhowe commented Dec 5, 2024

great news -- looking forward to it

@dhowe
Copy link

dhowe commented Dec 16, 2024

can we re-open this, so that we can track when its ready ?

@photopea
Copy link
Owner

WOFF fonts are supported by the latest release of Typr.js. Just give it a WOFF file as if it was a TTF file. It requires pako.js for Deflate decompression. It supports only WOFF and not WOFF2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants