Open nfroidure opened 6 years ago
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 🙏
@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?
@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.
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.
@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
woff2
generated file is 10kbwawoff
's generated file is 26kbttf2woff2
's generated file is 10kb@roydukkey i just tested:
git clone git@github.com: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.
@puzrin You're right. I found a typo in my code. :/
https://github.com/fontello/wawoff2