mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Remove the ability to pass in more than one font to BaseFontLoader.bind
- The only existing call-site, of this method, is never passing more than *one* font at a time anyway. - As far as I can remember, this functionality has never actually been used (caveat: I didn't check the git history). - This allows simplification of the method, especially by making use of the fact that it's now asynchronous. - It should be just as easy to call `BaseFontLoader.bind` from within a loop, rather than having the loop in the method itself.
This commit is contained in:
parent
af3fcca88d
commit
13230a1123
2 changed files with 29 additions and 38 deletions
|
@ -1945,7 +1945,7 @@ class WorkerTransport {
|
|||
fontRegistry,
|
||||
});
|
||||
|
||||
this.fontLoader.bind([font]).then(() => {
|
||||
this.fontLoader.bind(font).then(() => {
|
||||
this.commonObjs.resolve(id, font);
|
||||
});
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue