pdf.js/src/core
Calixte Denizet 117bbf7cd9 [api-minor] Don't normalize the text used in the text layer.
Some arabic chars like \ufe94 could be searched in a pdf, hence it must be normalized
when creating the search query. So to avoid to duplicate the normalization code,
everything is moved in the find controller.
The previous code to normalize text was using NFKC but with a hardcoded map, hence it
has been replaced by the use of normalize("NFKC") (it helps to reduce the bundle size
by 30kb).
In playing with this \ufe94 char, I noticed that the bidi algorithm wasn't taking into
account some RTL unicode ranges, the generated font wasn't embedding the mapping this
char and the unicode ranges in the OS/2 table weren't up-to-date.

When normalized some chars can be replaced by several ones and it induced to have
some extra chars in the text layer. To avoid any regression, when copying some text
from the text layer, a copied string is normalized (NFKC) before being put in the
clipboard (it works like this in either Acrobat or Chrome).
2023-04-17 14:31:23 +02:00
..
xfa Enable the unicorn/prefer-negative-index ESLint plugin rule 2023-03-24 10:18:32 +01:00
.eslintrc Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
annotation.js [api-minor] Remove the disableCombineTextItems option 2023-03-30 14:23:38 +02:00
arithmetic_decoder.js Re-factor how the ESLint no-var rule is enabled in the src/ folder 2020-10-03 20:15:29 +02:00
ascii_85_stream.js Fix the remaining ESLint operator-assignment errors 2021-07-04 15:23:56 +02:00
ascii_hex_stream.js Fix the remaining ESLint operator-assignment errors 2021-07-04 15:23:56 +02:00
base_stream.js [api-minor] Remove the forceClamped-functionality in the Streams (issue 14849) 2022-04-29 14:46:30 +02:00
bidi.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
calibri_factors.js XFA - Fix font scale factors (bug 1720888) 2021-07-28 19:10:42 +02:00
catalog.js Use String.prototype.replaceAll() where appropriate 2023-03-22 15:31:10 +01:00
ccitt_stream.js Prefer instanceof Dict rather than calling isDict() with one argument 2022-02-21 12:44:56 +01:00
ccitt.js Prevent an infinite loop when parsing corrupt /CCITTFaxDecode data (issue 14305) 2021-12-07 13:57:25 +01:00
cff_font.js Take the /CIDToGIDMap into account when getting the glyph mapping for CFF fonts (issue 15559) 2022-10-13 10:02:25 +02:00
cff_parser.js Simplify the CFFCompiler.compileTypedArray method 2023-04-15 11:13:34 +02:00
charsets.js Use ESLint to ensure that exports are sorted alphabetically 2021-01-09 20:37:51 +01:00
chunked_stream.js Move the arrayBuffersToBytes helper function into the worker-thread 2023-02-11 21:34:37 +01:00
cleanup_helper.js Add a (global) cache to the getCharUnicodeCategory function 2022-01-25 09:59:34 +01:00
cmap.js Remove the unused CMapCompressionType.STREAM value 2022-10-08 17:10:05 +02:00
colorspace.js Prefer instanceof Name rather than calling isName() with one argument 2022-02-21 12:45:00 +01:00
core_utils.js Reduce duplication in the validateCSSFont helper function 2023-03-26 12:12:49 +02:00
crypto.js Simplify the way to compute the remainder modulo 3 in PDF20Hash function 2022-10-07 14:43:31 +02:00
dataset_reader.js Refactor some xfa*** getters in document.js 2022-04-03 20:38:12 +02:00
decode_stream.js [api-minor] Remove the forceClamped-functionality in the Streams (issue 14849) 2022-04-29 14:46:30 +02:00
decrypt_stream.js Replace loop with TypedArray.prototype.set in the DecryptStream.readBlock method 2022-10-06 14:43:24 +02:00
default_appearance.js [Annotation] Take into account the stroke alpha for a FreeText without appearance 2023-02-07 22:15:27 +01:00
document.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
encodings.js Use ESLint to ensure that exports are sorted alphabetically 2021-01-09 20:37:51 +01:00
evaluator.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
file_spec.js Use String.prototype.replaceAll() where appropriate 2023-03-22 15:31:10 +01:00
flate_stream.js Remove some, with Prettier 2.3.0, unnecessary // prettier-ignore comments 2021-05-19 11:36:03 +02:00
font_renderer.js Enable the unicorn/prefer-at ESLint plugin rule (PR 15008 follow-up) 2022-06-09 21:21:19 +02:00
fonts_utils.js Enable the unicorn/prefer-string-replace-all ESLint plugin rule 2023-03-23 12:57:10 +01:00
fonts.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
function.js Simplify the isPDFFunction helper function 2023-03-27 11:34:20 +02:00
glyf.js Font renderer - get int8 instead of uint8 in composite glyphes (bug 1749563) 2022-01-18 22:06:23 +01:00
glyphlist.js Add more non-standard ligatures in the glyphlist.js file (issue 15516) 2022-09-27 16:31:51 +02:00
helvetica_factors.js XFA - Fix font scale factors (bug 1720888) 2021-07-28 19:10:42 +02:00
image_resizer.js Merge pull request #16117 from calixteman/workaround_bug1820511 2023-03-08 11:12:56 +01:00
image_utils.js Attempt to also cache images at the "page"-level (issue 16263) 2023-04-10 11:34:41 +02:00
image.js Render large images even if they're larger than the canvas limits (bug 1720282) 2023-03-05 14:07:07 +01:00
jbig2_stream.js Prefer instanceof Dict rather than calling isDict() with one argument 2022-02-21 12:44:56 +01:00
jbig2.js [JBIG2] Ensure that the decodeInteger function returns valid integers (issue 15942) 2023-01-19 17:14:17 +01:00
jpeg_stream.js [api-minor] Generate images in the worker instead of the main thread. 2023-03-01 17:40:12 +01:00
jpg.js [api-minor] Generate images in the worker instead of the main thread. 2023-03-01 17:40:12 +01:00
jpx_stream.js Stop special-casing the dict parameter in the Jbig2Stream/JpegStream/JpxStream constructors 2021-04-28 13:44:47 +02:00
jpx.js [JPEG 2000] Add support for resetContextProbabilities (bug 1731483) 2022-02-26 13:05:23 +01:00
liberationsans_widths.js XFA - Fix font scale factors (bug 1720888) 2021-07-28 19:10:42 +02:00
lzw_stream.js Move the DecodeStream and StreamsSequenceStream from src/core/stream.js and into its own file 2021-04-28 10:16:51 +02:00
metadata_parser.js Enable the unicorn/prefer-string-replace-all ESLint plugin rule 2023-03-23 12:57:10 +01:00
metrics.js [api-minor] Annotations - Adjust the font size in text field in considering the total width (bug 1721335) 2022-01-30 15:53:31 +01:00
myriadpro_factors.js XFA - Fix font scale factors (bug 1720888) 2021-07-28 19:10:42 +02:00
name_number_tree.js Support destinations in NameTrees with encoded keys (issue 14847) 2022-04-27 11:19:55 +02:00
object_loader.js Use more for...of loops in the code-base 2022-10-03 13:08:38 +02:00
opentype_file_builder.js Use more for...of loops in the code-base 2022-10-03 13:08:38 +02:00
operator_list.js [api-minor] Generate images in the worker instead of the main thread. 2023-03-01 17:40:12 +01:00
parser.js [api-minor] Remove the PDFDocumentProxy.stats getter (PR 15758 follow-up) 2023-01-01 17:06:47 +01:00
pattern.js [api-minor] Remove the deprecated onUnsupportedFeature functionality (PR 15758 follow-up) 2023-03-07 10:18:43 +01:00
pdf_manager.js Check OffscreenCanvas support once on the worker-thread 2023-02-27 12:27:28 +01:00
predictor_stream.js Prefer instanceof Dict rather than calling isDict() with one argument 2022-02-21 12:44:56 +01:00
primitives.js Enable the unicorn/prefer-logical-operator-over-ternary ESLint plugin rule 2022-07-12 10:52:37 +02:00
ps_parser.js Remove the closure used with the PostScriptToken class 2021-07-24 13:05:46 +02:00
run_length_stream.js Move the DecodeStream and StreamsSequenceStream from src/core/stream.js and into its own file 2021-04-28 10:16:51 +02:00
segoeui_factors.js XFA - Fix font scale factors (bug 1720888) 2021-07-28 19:10:42 +02:00
standard_fonts.js Extend getGlyphMapForStandardFonts with additional entries (issue 15977) 2023-01-30 12:13:21 +01:00
stream.js [api-minor] Remove the forceClamped-functionality in the Streams (issue 14849) 2022-04-29 14:46:30 +02:00
struct_tree.js Correct typos 2022-04-09 09:43:18 +09:00
to_unicode_map.js Convert src/core/to_unicode_map.js to use standard classes 2021-05-02 21:00:29 +02:00
type1_font.js Use more for...of loops in the code-base 2022-10-03 13:08:38 +02:00
type1_parser.js Enable the unicorn/prefer-negative-index ESLint plugin rule 2023-03-24 10:18:32 +01:00
unicode.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
worker_stream.js Replace a bunch of Array.prototype.forEach() cases with for...of loops instead 2021-04-24 13:00:19 +02:00
worker.js [api-minor] Don't normalize the text used in the text layer. 2023-04-17 14:31:23 +02:00
writer.js [Acroform] Use the full path to find the node in the XFA datasets where to store the value 2023-02-23 12:09:39 +01:00
xfa_fonts.js Enable the unicorn/prefer-at ESLint plugin rule (PR 15008 follow-up) 2022-06-09 21:21:19 +02:00
xml_parser.js Enable the unicorn/prefer-string-replace-all ESLint plugin rule 2023-03-23 12:57:10 +01:00
xref.js Track previous "XRefStm"s in a Set, rather than an Object 2023-03-22 09:41:19 +01:00