diff --git a/scripts/helpers/font.js b/scripts/helpers/font.js
index 5c46090ef..517e8e425 100644
--- a/scripts/helpers/font.js
+++ b/scripts/helpers/font.js
@@ -6,7 +6,7 @@ module.exports = function() {
if (!config || !config.enable) return '';
- const fontStyles = ':300,300italic,400,400italic,700,700italic';
+ const fontStyles = ':ital,wght@0,300;0,400;0,700;1,300;1,400;1,700';
const fontHost = config.host || 'https://fonts.googleapis.com';
// Get a font list from config
@@ -18,8 +18,8 @@ module.exports = function() {
});
fontFamilies = fontFamilies.map(name => name.trim().replace(/\s/g, '+') + fontStyles);
- fontFamilies = [...new Set(fontFamilies)].join('%7C');
+ fontFamilies = [...new Set(fontFamilies)].map(name => 'family=' + name).join('&');
// Merge extra parameters to the final processed font string
- return fontFamilies ? `` : '';
+ return fontFamilies ? `` : '';
};