pdf.js/test
Jonas Jenwald 08de655177 Add basic support for non-embedded Calibri fonts (issue 9195)
There's a number of issues with the fonts in the referenced PDF file. First of all, they contain broken `ToUnicode` data (`NUL` bytes all over the place). However even if you skip those, the `ToUnicode` data appears to contain nothing but a `IdentityH` CMap which won't help provide a proper glyph mapping.

The real issue actually turns out to be that the PDF file uses the "Calibri" font[1], but doesn't include any font files. Since that one isn't a standard font, and uses a fairly different CID to GID map compared to the standard fonts, we're not able to render the file even remotely correct.
To work around this, I'm thus proposing that we include a (incomplete) glyph map for Calibri, and fallback to the standard Helvetica font. Obviously this isn't going to look perfect, but it's really the best that we can hope to achieve given that the PDF file is missing the necessary font data.

Finally, please note that none of the PDF readers I've tried (Adobe Reader, PDFium in Chrome) were able to extract the text (which isn't very surprising, given the broken `ToUnicode` data).

Fixes 9195.

---

[1] According to Wikipedia, see https://en.wikipedia.org/wiki/Calibri, Calibri is (primarily) a Windows font.
2017-12-03 17:23:33 +01:00
..
chromium Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
features Remove usage of mozFillRule 2017-01-29 23:24:44 +01:00
font Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
pdfs Add basic support for non-embedded Calibri fonts (issue 9195) 2017-12-03 17:23:33 +01:00
resources Bots: disable the default browser test and enable E10s 2017-04-27 20:39:57 +02:00
stats Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
ttx Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
unit Implement unit tests for the utility functions bytesToString and stringToBytes 2017-12-03 12:52:16 +01:00
.eslintrc Removes shelljs 2017-05-19 07:53:05 -05:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
annotation_layer_builder_overrides.css Button widget annotations: implement support for pushbuttons 2017-11-26 14:09:48 +01:00
downloadutils.js Transform Web Archive URLs to avoid downloading an HTML page instead of the PDF file 2017-09-30 19:50:31 +02:00
driver.js [api-major] Remove the PDFJS_NEXT option 2017-10-16 23:16:51 +02:00
test_manifest.json Add basic support for non-embedded Calibri fonts (issue 9195) 2017-12-03 17:23:33 +01:00
test_slave.html Use the SimpleLinkService when running "annotations" reference tests 2017-09-12 15:24:46 +02:00
test.js Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
testutils.js Switch to using ESLint, instead of JSHint, for linting 2016-12-16 21:06:36 +01:00
text_layer_test.css Better "text" testing. 2015-11-19 11:03:52 -06:00
webbrowser.js Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 13:04:04 +02:00
webserver.js Add test for withCredentials option 2017-08-31 14:30:00 +02:00