|
|
@@ -81,7 +81,7 @@ this.docHelper = this.docHelper || (() => {
|
|
|
elementsInfo = new Map(Array.from(elementsInfo).filter(([element]) => element.getAttribute(markerRemovedContent) != ""));
|
|
|
}
|
|
|
if (options.removeUnusedStyles) {
|
|
|
- usedFonts = getUsedFonts(elementsInfo, Array.from(doc.fonts));
|
|
|
+ usedFonts = getUsedFonts(elementsInfo, Array.from(doc.fonts).filter(font => font.status == "loaded" || font.status == "loading"));
|
|
|
}
|
|
|
if (options.compressHTML) {
|
|
|
elementsInfo.forEach((elementInfo, element) => {
|