|
|
@@ -158,7 +158,14 @@ this.singlefile.lib.modules.fontsMinifier = this.singlefile.lib.modules.fontsMin
|
|
|
.filter(fontInfo => fontInfo.fontFamily == familyName && fontInfo.fontStyle == fontStyle)
|
|
|
.map(fontInfo => fontInfo.fontWeight)
|
|
|
.sort((weight1, weight2) => weight1 - weight2);
|
|
|
- const usedFontWeights = optionalUsedFonts.map(fontInfo => getUsedFontWeight(fontInfo, fontStyle, declaredFontsWeights));
|
|
|
+ let usedFontWeights = optionalUsedFonts.map(fontInfo => getUsedFontWeight(fontInfo, fontStyle, declaredFontsWeights));
|
|
|
+ test = usedFontWeights.includes(fontWeight);
|
|
|
+ if (!test) {
|
|
|
+ usedFontWeights = optionalUsedFonts.map(fontInfo => {
|
|
|
+ fontInfo[2] = "normal";
|
|
|
+ return getUsedFontWeight(fontInfo, fontStyle, declaredFontsWeights);
|
|
|
+ });
|
|
|
+ }
|
|
|
test = usedFontWeights.includes(fontWeight);
|
|
|
} else {
|
|
|
test = true;
|