|
|
@@ -64,7 +64,7 @@ this.docHelper = this.docHelper || (() => {
|
|
|
if (win) {
|
|
|
canvasData = getCanvasData(doc, win);
|
|
|
imageData = getImageData(doc, win, options);
|
|
|
- if (options.removeHiddenElements || options.removeAlternativeFonts || options.compressHTML) {
|
|
|
+ if (options.removeHiddenElements || options.removeUnusedStyles || options.compressHTML) {
|
|
|
let styles = getStyles(win, doc.body);
|
|
|
if (options.removeHiddenElements) {
|
|
|
const markerRemovedContent = removedContentAttributeName(options.sessionId);
|
|
|
@@ -83,7 +83,7 @@ this.docHelper = this.docHelper || (() => {
|
|
|
});
|
|
|
styles = new Map(Array.from(styles).filter(([element]) => element.getAttribute(markerRemovedContent) != ""));
|
|
|
}
|
|
|
- if (options.removeAlternativeFonts) {
|
|
|
+ if (options.removeUnusedStyles) {
|
|
|
usedFonts = getUsedFonts(styles);
|
|
|
}
|
|
|
if (options.compressHTML) {
|