[Firefox viewer] Skip some unnecessary code in the FontLoader.bind
method
Given that Firefox supports *synchronous* font loading, when the Font Loading API isn't being used, there's really no point including code which if called would just throw in the MOZCENTRAL build. (This is safe, since the `FontLoader.isSyncFontLoadingSupported`-getter always return `true` there.)
This commit is contained in:
parent
2161f334a0
commit
9ce2427e79
@ -112,6 +112,9 @@ class FontLoader {
|
||||
if (this.isSyncFontLoadingSupported) {
|
||||
return; // The font was, synchronously, loaded.
|
||||
}
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
||||
throw new Error("Not implemented: async font loading");
|
||||
}
|
||||
await new Promise(resolve => {
|
||||
const request = this._queueLoadingCallback(resolve);
|
||||
this._prepareFontLoadEvent(font, request);
|
||||
|
Loading…
Reference in New Issue
Block a user