|
|
@@ -188,10 +188,11 @@ this.fontsMinifier = this.fontsMinifier || (() => {
|
|
|
if (woffFontFound || woff2FontFound) {
|
|
|
fontSources = fontSources.filter(fontSource => woff2FontFound ? fontTest(fontSource, "woff2") : fontTest(fontSource, "woff"));
|
|
|
} else {
|
|
|
- const otfFontFound = fontSources.find(fontSource => fontTest(fontSource, "otf"));
|
|
|
- const ttfFontFound = fontSources.find(fontSource => fontTest(fontSource, "ttf"));
|
|
|
- if (otfFontFound || ttfFontFound) {
|
|
|
- fontSources = fontSources.filter(fontSource => otfFontFound ? fontTest(fontSource, "otf") : fontTest(fontSource, "ttf"));
|
|
|
+ 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"));
|
|
|
}
|
|
|
}
|
|
|
stats.fonts.discarded -= fontSources.length;
|