1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-23 08:38:06 +02:00

Merge pull request #19551 from Snuffleupagus/loadSystemFont-fix-assert

Fix the `assert` in `FontLoader.prototype.loadSystemFont`
This commit is contained in:
calixteman 2025-02-24 16:49:03 +01:00 committed by GitHub
commit fef706233d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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."
);