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

add woff2 fonts #12695

Merged
merged 4 commits into from Jul 25, 2018
Merged

add woff2 fonts #12695

merged 4 commits into from Jul 25, 2018

Conversation

Findus23
Copy link
Member

@Findus23 Findus23 commented Apr 4, 2018

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.

@Findus23 Findus23 added c: Design / UI For issues that impact Matomo's user interface or the design overall. Needs Review PRs that need a code review labels Apr 4, 2018
@sgiehl
Copy link
Member

sgiehl commented Apr 4, 2018

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

@Findus23 Findus23 mentioned this pull request Apr 4, 2018
@mattab mattab added this to the 3.6.0 milestone Apr 24, 2018
@diosmosis
Copy link
Member

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

@Findus23
Copy link
Member Author

@sgiehl, @diosmosis

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

@Findus23
Copy link
Member Author

Findus23 commented Jul 3, 2018

@sgiehl, @diosmosis

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

@sgiehl
Copy link
Member

sgiehl commented Jul 16, 2018

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

@diosmosis
Copy link
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
Copy link
Member Author

@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
Copy link
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
Copy link
Member Author

Travis seems to be using Ubuntu Trusty, but the woff2 package is only available in later versions:
https://packages.ubuntu.com/search?keywords=woff2

@diosmosis
Copy link
Member

Added an issue for automated tests: #13210

@diosmosis diosmosis merged commit 8dc06db into 3.x-dev Jul 25, 2018
@diosmosis diosmosis deleted the woff2 branch July 25, 2018 19:54
@Findus23 Findus23 mentioned this pull request Oct 8, 2018
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
* add woff2 fonts

* update woff2 files

* explain how to create woff2 files
@Findus23 Findus23 restored the woff2 branch October 4, 2019 09:49
@diosmosis diosmosis deleted the woff2 branch November 19, 2019 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add woff2 fonts
4 participants