diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 4baf3ffe2759aa..2ed7a82e4d23b1 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -4197,15 +4197,15 @@ class PartialEvaluator { if (standardFontName) { file = await this.fetchStandardFontData(standardFontName); properties.isInternalFont = !!file; - if (!properties.isInternalFont && this.options.useSystemFonts) { - properties.systemFontInfo = getFontSubstitution( - this.systemFontCache, - this.idFactory, - this.options.standardFontDataUrl, - baseFontName, - standardFontName - ); - } + } + if (!properties.isInternalFont && this.options.useSystemFonts) { + properties.systemFontInfo = getFontSubstitution( + this.systemFontCache, + this.idFactory, + this.options.standardFontDataUrl, + baseFontName, + standardFontName + ); } return this.extractDataStructures(dict, dict, properties).then( newProperties => { @@ -4310,15 +4310,15 @@ class PartialEvaluator { if (standardFontName) { fontFile = await this.fetchStandardFontData(standardFontName); isInternalFont = !!fontFile; - if (!isInternalFont && this.options.useSystemFonts) { - systemFontInfo = getFontSubstitution( - this.systemFontCache, - this.idFactory, - this.options.standardFontDataUrl, - fontName.name, - standardFontName - ); - } + } + if (!isInternalFont && this.options.useSystemFonts) { + systemFontInfo = getFontSubstitution( + this.systemFontCache, + this.idFactory, + this.options.standardFontDataUrl, + fontName.name, + standardFontName + ); } }