Is your feature request related to a problem? Please describe.
Not a major problem, just some possible perf improvements.
Describe the solution you'd like
Add woff2 support for Roboto font (while keeping woff as fallback). I notice the icon fonts already have woff2 support so this would just make things more consistent.
Also consider possibly adding local(...) as the first url in the @font-face src, so systems with Roboto installed can avoid using the webfont altogether.
Example from google-webfonts-helper's css:
/* roboto-regular - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'),
url('../fonts/roboto-v20-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v20-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-700 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'),
url('../fonts/roboto-v20-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v20-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
Describe alternatives you've considered
Disabling bundled Roboto and adding custom version with the features above, but I think the improvements would benefit everyone if they are included out of the box.
Additional context
Which character subsets are included in the Roboto included with Quasar? Can this be added to the docs?
Hi,
Hi @rstoenescu, fair enough for local(), but I don't see any woff2 for Roboto in @quasar/extras, only woff. There are only woff files in https://github.com/quasarframework/quasar/tree/dev/extras/roboto-font/web-font
Hmm, reopening as it should have been there.
Fixed it. Released "@quasar/extras" v1.6.3.
Thank you for reporting!
Sorry, but reverted the change and reopening. There are problems with the latest release.
There isn't any perf improvement if switching to woff2 format. On the contrary. Roboto is supplied in a lot of woff2 files (not just one) and the total size way exceeds the woff's.