-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Change typeface to Nunito #11932
Change typeface to Nunito #11932
Conversation
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
I absolutely LOVE it. π π₯ |
I really like it as well! π |
It is far better to read with this on a full HD screen over here. |
looks good π |
@skjnldsv thatβs a different discussion β letβs work on things step by step. :) @MorrisJobke @jospoortvliet @karlitschek could I have your approving review then? ;) Others from @nextcloud/designers please also check it out! |
For the record, once IE11 is phased out or we drop support for it, we can switch to woff2 as font format: https://caniuse.com/#search=woff2 |
Not going to happen that soon IMO. :/ |
What is wrong with ttf? |
@MorrisJobke according to caniuse:
So quicker loading times. Nunito Regular+Bold in ttf is 230 kB, whereas in woff2 (with latin extended even) itβs 77 kB. But alas β different topic for a time after IE11. :) |
Does the browser have a loading preference? If so we should probably keep all of them but in the proper order to make sure the browser try to load the better one? π€ |
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
I now added the woff2 format, as is apparently best practice. The code style of the fonts.scss is the same as used by Google Fonts, so should be good. Ref https://www.w3.org/TR/css-fonts-3/#src-desc about
Your reviews please @nextcloud/designers :) |
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!! Nice that the font loading is prioritised now :)
@juliushaertl @karlitschek @MorrisJobke @jospoortvliet so can I have your approving reviews? ;) The +1 does not make the approval process happy. :) |
@jancborchardt tests failing: There were 6 errors:
1) Test\Preview\BackgroundCleanupJobTest::testCleanupSystemCron
imagettftext(): Could not find/open font
/drone/src/github.com/nextcloud/server/lib/private/Preview/TXT.php:83
/drone/src/github.com/nextcloud/server/lib/private/Preview/GeneratorHelper.php:59
/drone/src/github.com/nextcloud/server/lib/private/Preview/Generator.php:194
/drone/src/github.com/nextcloud/server/lib/private/Preview/Generator.php:118
/drone/src/github.com/nextcloud/server/lib/private/PreviewManager.php:205
/drone/src/github.com/nextcloud/server/tests/lib/Preview/BackgroundCleanupJobTest.php:104
/drone/src/github.com/nextcloud/server/tests/lib/Preview/BackgroundCleanupJobTest.php:112
2) Test\Preview\BackgroundCleanupJobTest::testCleanupAjax
imagettftext(): Could not find/open font
/drone/src/github.com/nextcloud/server/lib/private/Preview/TXT.php:83
/drone/src/github.com/nextcloud/server/lib/private/Preview/GeneratorHelper.php:59
/drone/src/github.com/nextcloud/server/lib/private/Preview/Generator.php:194
/drone/src/github.com/nextcloud/server/lib/private/Preview/Generator.php:118
/drone/src/github.com/nextcloud/server/lib/private/PreviewManager.php:205
/drone/src/github.com/nextcloud/server/tests/lib/Preview/BackgroundCleanupJobTest.php:104
/drone/src/github.com/nextcloud/server/tests/lib/Preview/BackgroundCleanupJobTest.php:134
3) Test\Preview\TXTTest::testGetThumbnail with data set #0 (-72, -43)
imagettftext(): Could not find/open font
/drone/src/github.com/nextcloud/server/lib/private/Preview/TXT.php:83
/drone/src/github.com/nextcloud/server/tests/lib/Preview/Provider.php:139
/drone/src/github.com/nextcloud/server/tests/lib/Preview/Provider.php:103
4) Test\Preview\TXTTest::testGetThumbnail with data set #1 (73, 5)
imagettftext(): Could not find/open font
/drone/src/github.com/nextcloud/server/lib/private/Preview/TXT.php:83
/drone/src/github.com/nextcloud/server/tests/lib/Preview/Provider.php:139
/drone/src/github.com/nextcloud/server/tests/lib/Preview/Provider.php:103
5) Test\Preview\TXTTest::testGetThumbnail with data set #2 (-14, 91)
imagettftext(): Could not find/open font
/drone/src/github.com/nextcloud/server/lib/private/Preview/TXT.php:83
/drone/src/github.com/nextcloud/server/tests/lib/Preview/Provider.php:139
/drone/src/github.com/nextcloud/server/tests/lib/Preview/Provider.php:103
6) Test\Preview\TXTTest::testGetThumbnail with data set #3 (70, -39)
imagettftext(): Could not find/open font
/drone/src/github.com/nextcloud/server/lib/private/Preview/TXT.php:83
/drone/src/github.com/nextcloud/server/tests/lib/Preview/Provider.php:139
/drone/src/github.com/nextcloud/server/tests/lib/Preview/Provider.php:103
-- |
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
β¦regular+bold anyway Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
lib/private/Avatar.php
Outdated
@@ -62,15 +62,15 @@ class Avatar implements IAvatar { | |||
|
|||
/** | |||
* https://github.com/sebdesign/cap-height -- for 500px height | |||
* Open Sans cap-height is 0.72 and we want a 200px caps height size (0.4 letter-to-total-height ratio, 500*0.4=200). 200/0.72 = 278px. | |||
* Nunito cap-height is 0.72 and we want a 200px caps height size (0.4 letter-to-total-height ratio, 500*0.4=200). 200/0.72 = 278px. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nunito cap-height is 0.73 :)
https://s.codepen.io/skjnldsv/debug/ePLxry/WPkLYNWeKGPM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? I just checked with the linked tool and it said 0.7153β¦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With your updated pen at https://codepen.io/skjnldsv/full/PydLBK/, it says:
- Chrome: cap-height of Nunito is 0.7123077184349837
- Firefox: cap-height of Nunito is 0.7151666666666667
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: Nope, it's 0.713, so it's fine to leave it at 0.72
https://codepen.io/skjnldsv/pen/PydLBK/
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! π
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Failure unrelated: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good π
Based on discussions we had, most recently in #11873
#000000
to#222222