diff --git a/index.html b/index.html index 8b321ad1..28e9deae 100644 --- a/index.html +++ b/index.html @@ -1824,7 +1824,7 @@
- + Support Ukraine @@ -6250,7 +6250,7 @@ - + diff --git a/modules/fonts.js b/modules/fonts.js index 652ee524..1f5b1573 100644 --- a/modules/fonts.js +++ b/modules/fonts.js @@ -136,18 +136,15 @@ declareDefaultFonts(); // execute once on load function declareFont(font) { const {family, src, ...rest} = font; - if (!src) return; + addFontOption(family); + if (!src) return; const fontFace = new FontFace(family, src, {...rest, display: "block"}); document.fonts.add(fontFace); - addFontOption(family); } function declareDefaultFonts() { - fonts.forEach(font => { - if (font.src) declareFont(font); - else addFontOption(font.family); - }); + fonts.forEach(font => declareFont(font)); } function getUsedFonts(svg) {