mozilla/pdf.js — pull request #5077 by Snuffleupagus (2014-07-24 13:35:39+00:00)
Title: Fix loading of PDF files with invalid or missing Type3 characters (issue 5039)

Fixes #5039.

This PR actually addresses *two* different Type3 issues:
* The case described in the issue, where we're unable to load all font resources because of invalid data.
In the file in the issue, the offending font resource is the one for the "space" character. If we just catch the Promise rejection (in `evaluator.js`) all pages would finish rendering.
*However* there would be **no** spaces present between words, which is thus solved by adding an empty `OperatorList` to the `charProcOperatorList` array.

* To fix the issue referenced above, the changes in `evalutator.js` is actually enough.
But when I created the test case, I accidentally stumbled on another issue: if a `showText` command for a Type3 font contains a reference to a character not present in the font, the page won't finish rendering. Hence the changes to `canvas.js` to address this, hopefully rare, case.