Skip to content

Commit

Permalink
Merge pull request #19551 from Snuffleupagus/loadSystemFont-fix-assert
Browse files Browse the repository at this point in the history
Fix the `assert` in `FontLoader.prototype.loadSystemFont`
  • Loading branch information
calixteman authored Feb 24, 2025
2 parents 12d2f1b + 2966171 commit fef7062
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/display/font_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@ class FontLoader {
}
}

async loadSystemFont({ systemFontInfo: info, _inspectFont }) {
async loadSystemFont({
systemFontInfo: info,
disableFontFace,
_inspectFont,
}) {
if (!info || this.#systemFonts.has(info.loadedName)) {
return;
}
assert(
!this.disableFontFace,
!disableFontFace,
"loadSystemFont shouldn't be called when `disableFontFace` is set."
);

Expand Down

0 comments on commit fef7062

Please sign in to comment.