Gildas пре 7 година
родитељ
комит
e7200327fd
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      lib/single-file/css-fonts-minifier.js

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

@@ -188,11 +188,11 @@ this.fontsMinifier = this.fontsMinifier || (() => {
 		if (woffFontFound || woff2FontFound) {
 			fontSources = fontSources.filter(fontSource => woff2FontFound ? fontTest(fontSource, "woff2") : fontTest(fontSource, "woff"));
 		} else {
+			const ttfFontFound = fontSources.find(fontSource => fontTest(fontSource, "truetype"));
 			const otfFontFound = fontSources.find(fontSource => fontTest(fontSource, "opentype"));
 			const otfAltFontFound = fontSources.find(fontSource => fontTest(fontSource, "embedded-opentype"));
-			const ttfFontFound = fontSources.find(fontSource => fontTest(fontSource, "truetype"));
 			if (otfFontFound || otfAltFontFound || ttfFontFound) {
-				fontSources = fontSources.filter(fontSource => otfFontFound ? fontTest(fontSource, "opentype") : otfAltFontFound ? fontTest(fontSource, "embedded-opentype") : fontTest(fontSource, "truetype"));
+				fontSources = fontSources.filter(fontSource => ttfFontFound ? fontTest(fontSource, "truetype") : otfFontFound ? fontTest(fontSource, "opentype") : fontTest(fontSource, "embedded-opentype"));
 			}
 		}
 		stats.fonts.discarded -= fontSources.length;