소스 검색

use getFontFamily to normalize the font family name

Gildas 7 년 전
부모
커밋
2c0b05b099
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;