1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 07:08:08 +02:00
pdf.js/src
Jonas Jenwald 3177f6aa55 Parse the font file to determine the correct type/subtype, rather than relying on the (often incorrect) data in the font dictionary
The current font type/subtype detection code is quite inconsistent/unwieldy. In some cases it will simply assume that the font dictionary is correct, in others it will somewhat "arbitrarily" check the actual font file (more of these cases have been added over the years to fix specific bugs).

As is evident from e.g. issue 9949, the font type/subtype detection code is continuing to cause issues. In an attempt to get rid of these hacks once and for all, this patch instead re-factors the type/subtype detection to *always* parse the font file.

Please note that, as far as I can tell, we still appear to need to rely on the composite font detection based on the font dictionary. However, even if the composite/non-composite detection would get it wrong, that shouldn't really matter too much given that there's basically only two different code-paths (for "TrueType-like" vs "Type1-like" fonts).
2018-08-05 11:13:16 +02:00
..
core Parse the font file to determine the correct type/subtype, rather than relying on the (often incorrect) data in the font dictionary 2018-08-05 11:13:16 +02:00
display Prevent Metadata/XML parsing from breaking PDFDocumentProxy.getMetadata when no XML root document is found (issue 8884) 2018-07-18 11:37:40 +02:00
images Vectorize the logo. 2012-10-29 14:08:52 -04:00
shared Move the toRoman helper function out of the Util scope 2018-07-10 10:45:25 +02:00
doc_helper.js [api-major] Completely remove the global PDFJS object 2018-03-01 18:13:27 +01:00
license_header.js Replace copyright headers; changes UMD to CommonJS. 2017-02-08 16:35:58 -06:00
license_header_libre.js PDFjs now compatible with Librejs 2017-12-19 15:13:50 +05:30
pdf.image_decoders.js Add a gulp image_decoders command to allow packaging/distributing the image decoders (i.e. jpg.js, jpx.js, jbig2.js) separately from the main PDF.js library 2018-06-16 17:56:54 +02:00
pdf.js Stop exposing the URL polyfill in the global scope 2018-07-04 09:16:28 +02:00
pdf.worker.entry.js Rename the globals to shorter names. 2018-03-16 11:08:56 -07:00
pdf.worker.js Adds Streams API support for networking task of PDF.js project. 2017-07-28 02:32:30 +05:30
worker_loader.js Moves global scope out of shared/util. 2017-08-22 18:20:52 -05:00