Explorar el Código

use getFontFamily to normalize the font family name

Gildas hace 7 años
padre
commit
2c0b05b099
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/single-file/rules-minifier.js

+ 1 - 1
lib/single-file/rules-minifier.js

@@ -106,7 +106,7 @@ this.rulesMinifier = this.rulesMinifier || (() => {
 					stylesheetContent += "}";
 				} else if (rule.selectorText) {
 					stylesheetContent += rule.cssText;
-				} else if (rule.type == CSSRule.FONT_FACE_RULE && rule.style && rule.style.fontFamily && !unusedFonts.includes(rule.style.fontFamily.trim())) {
+				} else if (rule.type == CSSRule.FONT_FACE_RULE && rule.style && rule.style.fontFamily && !unusedFonts.includes(getFontFamily(rule.style.fontFamily))) {
 					stylesheetContent += rule.cssText;
 				} else if (rule.type != CSSRule.FONT_FACE_RULE) {
 					stylesheetContent += rule.cssText;