|
|
@@ -297,13 +297,12 @@ this.fontsMinifier = this.fontsMinifier || (() => {
|
|
|
const optionalUsedFonts = filteredUsedFonts && filteredUsedFonts.get(fontFamily);
|
|
|
if (optionalUsedFonts && optionalUsedFonts.length) {
|
|
|
const fontStyle = rule.style.getPropertyValue("font-style") || "normal";
|
|
|
- // const fontWeight = getFontWeight(rule.style.getPropertyValue("font-weight")) || "400";
|
|
|
+ const fontWeight = getFontWeight(rule.style.getPropertyValue("font-weight")) || "400";
|
|
|
+ const fontVariant = rule.style.getPropertyValue("font-variant");
|
|
|
optionalTest = optionalUsedFonts.find(fontInfo => fontInfo.fontStyle == fontStyle);
|
|
|
if (optionalTest) {
|
|
|
- const fontVariant = rule.style.getPropertyValue("font-variant");
|
|
|
optionalTest = optionalUsedFonts.find(fontInfo => fontInfo.fontVariant == fontVariant || "normal" || fontInfo.fontVariant == fontVariant || "common-ligatures");
|
|
|
}
|
|
|
- /*
|
|
|
if (optionalTest) {
|
|
|
if (isNaN(fontWeight)) {
|
|
|
optionalTest = true;
|
|
|
@@ -317,7 +316,6 @@ this.fontsMinifier = this.fontsMinifier || (() => {
|
|
|
optionalTest = usedComputedFontWeights.includes(fontWeight);
|
|
|
}
|
|
|
}
|
|
|
- */
|
|
|
} else {
|
|
|
optionalTest = true;
|
|
|
}
|