@Findus23 opened this Pull Request on April 4th 2018 Member

fixes #12662

Woff2 is supported by every modern browser and the rest falls back to woff or worst case ttf.
Woff2 uses brotli for compression and is therefore far smaller than woff:

-rw-r--r-- 1 lukas lukas  73K Mär 23 10:07 matomo.svg
-rw-r--r-- 1 lukas lukas  26K Mär 23 10:07 matomo.ttf
-rw-r--r-- 1 lukas lukas  26K Mär 23 10:07 matomo.woff
-rw-r--r-- 1 lukas lukas  11K Apr  4 10:31 matomo.woff2
-rw-r--r-- 1 lukas lukas  71K Feb 10 18:17 piwik.svg
-rw-r--r-- 1 lukas lukas  25K Feb 10 18:17 piwik.ttf
-rw-r--r-- 1 lukas lukas  25K Feb 10 18:17 piwik.woff
-rw-r--r-- 1 lukas lukas 9,9K Apr  4 10:31 piwik.woff2

I have also changed the order because every browser uses the first font it supports and therefor woff wasn't used before.

The file has been generated with the official google tool: https://github.com/google/woff2

I guess we'll also need to update the server config as in #11091.

@sgiehl commented on April 4th 2018 Member

Would you mind mentioning the additional steps required for generating the woff2 in https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/Morpheus/fonts/README.md

@diosmosis commented on June 13th 2018 Member

@Findus23 will you have time to add to the README as @sgiehl's suggested?

@Findus23 commented on June 25th 2018 Member

@sgiehl, @diosmosis

Seems like I missed your comments. I have now put it on my todo-list for next week.

@Findus23 commented on July 3rd 2018 Member

@sgiehl, @diosmosis

This should be done now. (I also updated the files to the latest matomo.ttf)

@sgiehl commented on July 16th 2018 Member

Wondering if we maybe could add a test to check if the woff2 files are out of sync

@diosmosis commented on July 24th 2018 Member

@Findus23 will you be able to apply @sgiehl's last comment? think that should be all that needs to be done before this can be merged.

@Findus23 commented on July 25th 2018 Member

@sgiehl, @diosmosis
I'm not sure how I would write such a test. I couldn't find any existing tests and I am not sure how to detect that the woff2 is outdated.

@diosmosis commented on July 25th 2018 Member

Haven't thought about alternatives, but one way might be to just run woff2_compress in a test and see if the result is the same as what's in git. A test like this would probably be added to ReleaseCheckListTest. May need to add woff2 to travis.

No worries if you don't have time to add it.

@Findus23 commented on July 25th 2018 Member

Travis seems to be using Ubuntu Trusty, but the woff2 package is only available in later versions:

@diosmosis commented on July 25th 2018 Member

Added an issue for automated tests: https://github.com/matomo-org/matomo/issues/13210

This Pull Request was closed on July 25th 2018
Powered by GitHub Issue Mirror