mozilla/pdf.js — pull request #4147 by Snuffleupagus (2014-01-18 13:59:01+00:00)
Title: Fix loading of fonts with invalid encoding entry (bug 859204)

This PR fixes loading of fonts whose `Encoding` entry is an invalid name, by falling back to a predefined encoding.

Note that the change of default encoding here: https://github.com/Snuffleupagus/pdf.js/blob/5ed708ddcb12601b0fee86b292152305a26cf206/src/core/evaluator.js#L833, might seem unnecessary. In this particular case though, it was needed in order to display e.g. the "bullets" correctly. I've tested this patch locally, and didn't get a single failure with this line changed, so I hope this might be OK! Besides, PDF files with fonts without valid `Encoding` entries should *hopefully* be rare.

I created a reduced testcase for the bug, using: http://brendandahl.github.io/pdf.js.utils/maker/.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=859204.