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

Use wawoff2 as the JS fallback ? #39

Open
nfroidure opened this issue May 8, 2018 · 7 comments
Open

Use wawoff2 as the JS fallback ? #39

nfroidure opened this issue May 8, 2018 · 7 comments
Assignees
Labels

Comments

@nfroidure
Copy link
Owner

https://github.com/fontello/wawoff2

@nfroidure nfroidure self-assigned this May 8, 2018
@pioug
Copy link
Collaborator

pioug commented May 17, 2018

I am a bit curious about this. Can you give some details about the difference between ttf2woff2 and wawoff2 in terms of features? (besides the emscripten/node-gyp/wasm thing)

Loving the set of tools that you're providing to convert font/svg 💕 In return, I am looking for a way to help you maintaining them 🙏

@roydukkey
Copy link

@nfroidure @puzrin I've noticed that the files that ttf2woff2 creates are much smaller than wawoff2 (assuming default configs). Any clue the reason for this?

@puzrin
Copy link

puzrin commented Jan 23, 2019

@roydukkey

First, check if "smaller" file really works.

I have no ideas about size. But i can say wawoff2 is binary equal to native woff2. It has appropriate fixtures to test. Since time is limited, i prefer a simple approach: "if result is binary equal to original, nobody cares about what happens inside".

Try latest native woff2 1.0.3 version. If size is smaller than one by 1.0.2 (current wawoff2), i will update.

@nfroidure
Copy link
Owner Author

Tbh, I do not use this set of tools anymore and anyone wanted to take the leadership on it is welcome. That said, I think the difference in weight may come from the fact the native sources were not updated since a long time.

If I were to improve the font generation pipeline for myself, I think I would probably replace this plugin directly by its wasm implementation.

@roydukkey
Copy link

@nfroidure @puzrin Both versions of woff2 produces files of the same size.

However, wawoff doesn't seem to be compressing. Here are the files that I have generated from the three services. Files.zip

  1. the source TTF is 26kb
  2. Google's woff2 generated file is 10kb
  3. wawoff's generated file is 26kb
  4. ttf2woff2's generated file is 10kb

@puzrin
Copy link

puzrin commented Jan 24, 2019

@roydukkey i just tested:

git clone [email protected]:fontello/wawoff2.git
cd ./wawoff2
npm install
# copy-paste ttf from your archive
./bin/woff2_compress.js fira-sans-compressed-italic-400.ttf
# size of created .woff2 is 10132 bytes.

Ubuntu 18.04 LTS, node v10.11.0

Size is exactly as it should be, equal to other compressed files from your archive.

@roydukkey
Copy link

@puzrin You're right. I found a typo in my code. :/

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

No branches or pull requests

4 participants