08de655177
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. |
||
---|---|---|
.. | ||
chromium | ||
features | ||
font | ||
pdfs | ||
resources | ||
stats | ||
ttx | ||
unit | ||
.eslintrc | ||
.gitignore | ||
annotation_layer_builder_overrides.css | ||
downloadutils.js | ||
driver.js | ||
test_manifest.json | ||
test_slave.html | ||
test.js | ||
testutils.js | ||
text_layer_test.css | ||
webbrowser.js | ||
webserver.js |