pdf.js/src/core
Jonas Jenwald f5be2d62a3 Improve the heuristics, in PartialEvaluator._buildSimpleFontToUnicode, for glyphNames of the Cdd{d}/cdd{d} format (issue 9655)
*Please note:* I've been thinking about possible ways of addressing this issue for a while now, but all of the solutions I came up with became too complicated and thus hurt readability of the code.
However, it occured to me that we're essentially trying to add a heuristic *on top* of another heuristic, and that it shouldn't matter how efficient the code is as long as it works.

In the PDF file in the issue the Encoding contains glyphNames of the `Cdd` format, which our existing heuristics will treat as base 10 values. However, in this particular file they actually contain base 16 values, which we thus attempt to detect and fix such that text-selection works.
2019-10-06 10:47:29 +02:00
..
annotation.js Use more ES6 syntax in src/core/annotation.js 2019-09-02 22:37:27 +02:00
arithmetic_decoder.js Convert src/core/arithmetic_decoder.js to ES6 syntax 2019-01-06 15:04:01 +01:00
bidi.js Fix inconsistent spacing and trailing commas in objects in src/core/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 11:20:19 +02:00
ccitt_stream.js Extract the actual decoding in CCITTFaxStream into a new CCITTFaxDecoder "class", which the new CCITTFaxStream depends on 2017-10-24 16:03:08 +02:00
ccitt.js Fix abbreviation. 2018-09-13 13:10:38 -07:00
cff_parser.js Put the string name of the glyph in the charset array. 2019-03-01 18:03:51 -08:00
charsets.js Convert src/core/charsets.js and src/core/standard_fonts.js to ES6 syntax 2019-01-06 15:04:01 +01:00
chunked_stream.js Ensure that ReadableStreams are cancelled with actual Errors 2019-08-01 16:40:46 +02:00
cmap.js Move worker-thread only functions from src/shared/util.js and into a new src/core/core_utils.js file 2019-02-24 00:35:39 +01:00
colorspace.js Reduce unnecessary duplication of the isDefaultDecode methods on ColorSpace instances 2019-01-25 08:53:08 +01:00
core_utils.js Convert the various ...Exceptions to proper classes, to reduce code duplication 2019-09-29 10:16:20 +02:00
crypto.js Implement the AESBaseCipher class and let the AES128Cipher and AES256Cipher classes extend it 2018-02-03 20:16:33 +01:00
document.js Use streams for OperatorList chunking (issue 10023) 2019-08-24 15:56:40 +02:00
encodings.js Implement unit tests for the encodings and fix missing items 2017-12-24 18:14:40 +01:00
evaluator.js Improve the heuristics, in PartialEvaluator._buildSimpleFontToUnicode, for glyphNames of the Cdd{d}/cdd{d} format (issue 9655) 2019-10-06 10:47:29 +02:00
font_renderer.js Map all glyphs to the private use area and duplicate the first glyph. 2018-09-05 14:04:54 -07:00
fonts.js For Type1 fonts, replace missing font dictionary /Widths entries with ones from the font data (issue 11150) 2019-09-18 10:15:09 +02:00
function.js Use Dict.getArray, instead of Dict.get, when getting the 'Size' in constructSampled in src/core/function.js (PR 7295 follow-up) 2018-06-02 11:16:05 -04:00
glyphlist.js Add a work-around, in glyphlist.js, for bad PDF generators which use a non-standard /f_f string in the Encoding dictionary when referring to the ff ligature (issue 11016) 2019-07-30 17:06:58 +02:00
image_utils.js Move NativeImageDecoder into a separate file, and convert it to a class 2019-03-09 15:59:04 +01:00
image.js Reduce unnecessary duplication of the isDefaultDecode methods on ColorSpace instances 2019-01-25 08:53:08 +01:00
jbig2_stream.js Fix the interface of JpegStream/JpxStream/Jbig2Stream to agree with the other DecodeStreams 2017-11-11 11:22:16 +01:00
jbig2.js Convert the various image decoder ...Errors to classes extending BaseException (PR 11185 follow-up) 2019-10-01 13:10:14 +02:00
jpeg_stream.js Add a new parameter to JpegImage.getData to indicate the source of the image data (issue 9513) 2018-09-02 14:15:22 +02:00
jpg.js Convert the various image decoder ...Errors to classes extending BaseException (PR 11185 follow-up) 2019-10-01 13:10:14 +02:00
jpx_stream.js Fix the interface of JpegStream/JpxStream/Jbig2Stream to agree with the other DecodeStreams 2017-11-11 11:22:16 +01:00
jpx.js Convert the various image decoder ...Errors to classes extending BaseException (PR 11185 follow-up) 2019-10-01 13:10:14 +02:00
metrics.js Move worker-thread only functions from src/shared/util.js and into a new src/core/core_utils.js file 2019-02-24 00:35:39 +01:00
murmurhash3.js Convert MurmurHash3_64 to an ES6 class 2019-03-09 17:03:06 +01:00
obj.js Replace the XRef.cache Array with a Map instead 2019-08-18 12:07:18 +02:00
operator_list.js Don't enqueue unused properties when sending 'GetOperatorList' data from the worker-thread (PR 11069 follow-up) 2019-09-09 17:41:26 +02:00
parser.js Reduce the number of temporary variables in the Parser.getObj method 2019-08-16 13:51:41 +02:00
pattern.js Avoid floating point inaccuracy in gradient color stops 2019-09-17 21:01:17 +03:00
pdf_manager.js Ensure that ReadableStreams are cancelled with actual Errors 2019-08-01 16:40:46 +02:00
primitives.js Reduce the number of function calls in the Dict class 2019-09-24 08:31:39 +02:00
ps_parser.js Convert src/core/charsets.js and src/core/standard_fonts.js to ES6 syntax 2019-01-06 15:04:01 +01:00
standard_fonts.js Move worker-thread only functions from src/shared/util.js and into a new src/core/core_utils.js file 2019-02-24 00:35:39 +01:00
stream.js Simplify the PDFDocument.fingerprint method slightly 2019-07-15 13:26:08 +02:00
type1_parser.js For Type1 fonts, replace missing font dictionary /Widths entries with ones from the font data (issue 11150) 2019-09-18 10:15:09 +02:00
unicode.js Move worker-thread only functions from src/shared/util.js and into a new src/core/core_utils.js file 2019-02-24 00:35:39 +01:00
worker_stream.js Move PDFWorkerStream and related code to its own file 2019-06-15 13:05:25 +02:00
worker.js Adjust the values sent, with the 'test' message, by the WorkerMessageHandler.setup method 2019-09-05 11:27:27 +02:00