Procházet zdrojové kódy

choose woff over woff2

Gildas před 7 roky
rodič
revize
eddad92e35
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      lib/single-file/css-fonts-minifier.js

+ 2 - 2
lib/single-file/css-fonts-minifier.js

@@ -227,10 +227,10 @@ this.fontsMinifier = this.fontsMinifier || (() => {
 		const fontTest = (fontSource, format) => fontSource.src != EMPTY_URL_SOURCE && fontSource.format == format;
 		let woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff2-variations"));
 		if (!woffFontFound) {
-			woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff2"));
+			woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff"));
 		}
 		if (!woffFontFound) {
-			woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff"));
+			woffFontFound = fontSources.find(fontSource => fontTest(fontSource, "woff2"));
 		}
 		stats.fonts.processed += fontSources.length;
 		stats.fonts.discarded += fontSources.length;