Swap webfonts on load

This commit is contained in:
Dennis Reimann 2020-08-07 11:41:18 +02:00
parent 7c349b12b2
commit 0e1818f535
No known key found for this signature in database
GPG Key ID: 5009E1797F03F8D0
4 changed files with 23 additions and 0 deletions

View File

@ -3,6 +3,7 @@
font-family: 'Montserrat';
font-style: normal;
font-weight: 300;
font-display: swap;
src: local('Montserrat Light'), local('Montserrat-Light'),
url('/fonts/montserrat-v14-latin-ext_latin-300.woff2') format('woff2'),
url('/fonts/montserrat-v14-latin-ext_latin-300.woff') format('woff');
@ -12,6 +13,7 @@
font-family: 'Montserrat';
font-style: italic;
font-weight: 300;
font-display: swap;
src: local('Montserrat Light Italic'), local('Montserrat-LightItalic'),
url('/fonts/montserrat-v14-latin-ext_latin-300italic.woff2') format('woff2'),
url('/fonts/montserrat-v14-latin-ext_latin-300italic.woff') format('woff');
@ -21,6 +23,7 @@
font-family: 'Montserrat';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Montserrat Regular'), local('Montserrat-Regular'),
url('/fonts/montserrat-v14-latin-ext_latin-regular.woff2') format('woff2'),
url('/fonts/montserrat-v14-latin-ext_latin-regular.woff') format('woff');
@ -30,6 +33,7 @@
font-family: 'Montserrat';
font-style: italic;
font-weight: 400;
font-display: swap;
src: local('Montserrat Italic'), local('Montserrat-Italic'),
url('/fonts/montserrat-v14-latin-ext_latin-italic.woff2') format('woff2'),
url('/fonts/montserrat-v14-latin-ext_latin-italic.woff') format('woff');
@ -39,6 +43,7 @@
font-family: 'Montserrat';
font-style: normal;
font-weight: 700;
font-display: swap;
src: local('Montserrat Bold'), local('Montserrat-Bold'),
url('/fonts/montserrat-v14-latin-ext_latin-700.woff2') format('woff2'),
url('/fonts/montserrat-v14-latin-ext_latin-700.woff') format('woff');
@ -48,6 +53,7 @@
font-family: 'Montserrat';
font-style: italic;
font-weight: 700;
font-display: swap;
src: local('Montserrat Bold Italic'), local('Montserrat-BoldItalic'),
url('/fonts/montserrat-v14-latin-ext_latin-700italic.woff2') format('woff2'),
url('/fonts/montserrat-v14-latin-ext_latin-700italic.woff') format('woff');

View File

@ -3,6 +3,7 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
font-display: swap;
src: local('Open Sans Light'), local('OpenSans-Light'),
url('/fonts/open-sans-v17-latin-ext_latin-300.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-300.woff') format('woff');
@ -12,6 +13,7 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Open Sans Regular'), local('OpenSans-Regular'),
url('/fonts/open-sans-v17-latin-ext_latin-regular.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-regular.woff') format('woff');
@ -21,6 +23,7 @@
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
font-display: swap;
src: local('Open Sans Italic'), local('OpenSans-Italic'),
url('/fonts/open-sans-v17-latin-ext_latin-italic.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-italic.woff') format('woff');
@ -30,6 +33,7 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
font-display: swap;
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
url('/fonts/open-sans-v17-latin-ext_latin-600.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-600.woff') format('woff');
@ -39,6 +43,7 @@
font-family: 'Open Sans';
font-style: italic;
font-weight: 300;
font-display: swap;
src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'),
url('/fonts/open-sans-v17-latin-ext_latin-300italic.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-300italic.woff') format('woff');
@ -48,6 +53,7 @@
font-family: 'Open Sans';
font-style: italic;
font-weight: 600;
font-display: swap;
src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'),
url('/fonts/open-sans-v17-latin-ext_latin-600italic.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-600italic.woff') format('woff');
@ -57,6 +63,7 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src: local('Open Sans Bold'), local('OpenSans-Bold'),
url('/fonts/open-sans-v17-latin-ext_latin-700.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-700.woff') format('woff');
@ -66,6 +73,7 @@
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
font-display: swap;
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'),
url('/fonts/open-sans-v17-latin-ext_latin-700italic.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-700italic.woff') format('woff');
@ -75,6 +83,7 @@
font-family: 'Open Sans';
font-style: normal;
font-weight: 800;
font-display: swap;
src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'),
url('/fonts/open-sans-v17-latin-ext_latin-800.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-800.woff') format('woff');
@ -84,6 +93,7 @@
font-family: 'Open Sans';
font-style: italic;
font-weight: 800;
font-display: swap;
src: local('Open Sans ExtraBold Italic'), local('OpenSans-ExtraBoldItalic'),
url('/fonts/open-sans-v17-latin-ext_latin-800italic.woff2') format('woff2'),
url('/fonts/open-sans-v17-latin-ext_latin-800italic.woff') format('woff');

View File

@ -3,6 +3,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Roboto'), local('Roboto-Regular'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2') format('woff2'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff') format('woff');
@ -12,6 +13,7 @@
font-family: 'Roboto';
font-style: italic;
font-weight: 400;
font-display: swap;
src: local('Roboto Italic'), local('Roboto-Italic'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2') format('woff2'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff') format('woff');
@ -21,6 +23,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
font-display: swap;
src: local('Roboto Medium'), local('Roboto-Medium'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff2') format('woff2'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff') format('woff');
@ -30,6 +33,7 @@
font-family: 'Roboto';
font-style: italic;
font-weight: 500;
font-display: swap;
src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff2') format('woff2'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff') format('woff');
@ -39,6 +43,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
font-display: swap;
src: local('Roboto Bold'), local('Roboto-Bold'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2') format('woff2'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700.woff') format('woff');
@ -48,6 +53,7 @@
font-family: 'Roboto';
font-style: italic;
font-weight: 700;
font-display: swap;
src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff2') format('woff2'),
url('/fonts/roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff') format('woff');

View File

@ -3,6 +3,7 @@
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/roboto-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff2') format('woff2'),
url('/fonts/roboto-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff') format('woff');
}