diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2018-10-19 20:19:34 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2018-10-19 20:19:34 +0200 |
commit | c57c9f42b200729861c72c4a125bcfc59ccdbd54 (patch) | |
tree | 3ec03c3d385d8d668e4e0593e09fd8e797cc7447 | |
parent | 2eceb1a3b37d394262eef619b136415df435fcb4 (diff) | |
download | nextcloud-server-c57c9f42b200729861c72c4a125bcfc59ccdbd54.tar.gz nextcloud-server-c57c9f42b200729861c72c4a125bcfc59ccdbd54.zip |
Add woff2 format of Nunito for better performance in modern browsers
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
-rw-r--r-- | core/css/fonts.scss | 36 | ||||
-rw-r--r-- | core/css/guest.css | 41 | ||||
-rw-r--r-- | core/fonts/Nunito-Bold-latin-ext.woff2 | bin | 0 -> 18912 bytes | |||
-rw-r--r-- | core/fonts/Nunito-Bold.woff2 | bin | 0 -> 19748 bytes | |||
-rw-r--r-- | core/fonts/Nunito-Regular-latin-ext.woff2 | bin | 0 -> 18504 bytes | |||
-rw-r--r-- | core/fonts/Nunito-Regular.woff2 | bin | 0 -> 19600 bytes |
6 files changed, 67 insertions, 10 deletions
diff --git a/core/css/fonts.scss b/core/css/fonts.scss index 2b1fe7c31d8..1e0b14af22f 100644 --- a/core/css/fonts.scss +++ b/core/css/fonts.scss @@ -1,15 +1,43 @@ +/* latin-ext */ @font-face { font-family: 'Nunito'; font-style: normal; - font-weight: normal; + font-weight: 400; /* normal */ src: local('Nunito Regular'), local('Nunito-Regular'), - url('../fonts/Nunito-Regular.ttf') format('ttf'); + url('../fonts/Nunito-Regular-latin-ext.woff2') format('woff2'), + url('../fonts/Nunito-Regular.ttf') format('truetype'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } +/* latin */ @font-face { font-family: 'Nunito'; font-style: normal; - font-weight: bold; + font-weight: 400; /* normal */ + src: local('Nunito Regular'), local('Nunito-Regular'), + url('../fonts/Nunito-Regular.woff2') format('woff2'), + url('../fonts/Nunito-Regular.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; /* bold */ + src: local('Nunito Bold'), local('Nunito-Bold'), + url('../fonts/Nunito-Bold-latin-ext.woff2') format('woff2'), + url('../fonts/Nunito-Bold.ttf') format('truetype'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; /* bold */ src: local('Nunito Bold'), local('Nunito-Bold'), - url('../fonts/Nunito-Bold.ttf') format('ttf'); + url('../fonts/Nunito-Bold.woff2') format('woff2'), + url('../fonts/Nunito-Bold.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } diff --git a/core/css/guest.css b/core/css/guest.css index d620237e826..70fd8706f3b 100644 --- a/core/css/guest.css +++ b/core/css/guest.css @@ -456,7 +456,7 @@ form .warning input[type='checkbox']+label { margin: 10px 0; text-align: center; width: 100%; - text-shadow: 0 0 2px rgba(0, 0, 0, .4); // better readability on bright background + text-shadow: 0 0 2px rgba(0, 0, 0, .4); /* better readability on bright background */ } .lost-password-container #lost-password, .lost-password-container #lost-password-back { @@ -652,7 +652,7 @@ fieldset.update legend + p { } p.info { margin: 20px auto; - text-shadow: 0 0 2px rgba(0, 0, 0, .4); // better readability on bright background + text-shadow: 0 0 2px rgba(0, 0, 0, .4); /* better readability on bright background */ -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; @@ -823,18 +823,47 @@ a.legal { font-size: smaller; } + +/* latin-ext */ @font-face { font-family: 'Nunito'; font-style: normal; - font-weight: normal; + font-weight: 400; /* normal */ src: local('Nunito Regular'), local('Nunito-Regular'), - url('../fonts/Nunito-Regular.ttf') format('ttf'); + url('../fonts/Nunito-Regular-latin-ext.woff2') format('woff2'), + url('../fonts/Nunito-Regular.ttf') format('truetype'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } +/* latin */ @font-face { font-family: 'Nunito'; font-style: normal; - font-weight: bold; + font-weight: 400; /* normal */ + src: local('Nunito Regular'), local('Nunito-Regular'), + url('../fonts/Nunito-Regular.woff2') format('woff2'), + url('../fonts/Nunito-Regular.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin-ext */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; /* bold */ + src: local('Nunito Bold'), local('Nunito-Bold'), + url('../fonts/Nunito-Bold-latin-ext.woff2') format('woff2'), + url('../fonts/Nunito-Bold.ttf') format('truetype'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-family: 'Nunito'; + font-style: normal; + font-weight: 700; /* bold */ src: local('Nunito Bold'), local('Nunito-Bold'), - url('../fonts/Nunito-Bold.ttf') format('ttf'); + url('../fonts/Nunito-Bold.woff2') format('woff2'), + url('../fonts/Nunito-Bold.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } diff --git a/core/fonts/Nunito-Bold-latin-ext.woff2 b/core/fonts/Nunito-Bold-latin-ext.woff2 Binary files differnew file mode 100644 index 00000000000..d69ce0d32e9 --- /dev/null +++ b/core/fonts/Nunito-Bold-latin-ext.woff2 diff --git a/core/fonts/Nunito-Bold.woff2 b/core/fonts/Nunito-Bold.woff2 Binary files differnew file mode 100644 index 00000000000..fef6db672d6 --- /dev/null +++ b/core/fonts/Nunito-Bold.woff2 diff --git a/core/fonts/Nunito-Regular-latin-ext.woff2 b/core/fonts/Nunito-Regular-latin-ext.woff2 Binary files differnew file mode 100644 index 00000000000..8c7dd0f9898 --- /dev/null +++ b/core/fonts/Nunito-Regular-latin-ext.woff2 diff --git a/core/fonts/Nunito-Regular.woff2 b/core/fonts/Nunito-Regular.woff2 Binary files differnew file mode 100644 index 00000000000..28b65a12e67 --- /dev/null +++ b/core/fonts/Nunito-Regular.woff2 |