Merge pull request #11810 from Snuffleupagus/fromCodePoint-followup

A couple of small `String.fromCodePoint` improvements (PR 11698 and 11769 follow-up)
This commit is contained in:
Tim van der Meij 2020-04-16 00:08:16 +02:00 committed by GitHub
commit a7def05aa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 1 deletions

View File

@ -2587,7 +2587,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
code = unicode; code = unicode;
} }
} }
if (code > 0 && Number.isInteger(code)) { if (code > 0 && code <= 0x10ffff && Number.isInteger(code)) {
// If `baseEncodingName` is one the predefined encodings, and `code` // If `baseEncodingName` is one the predefined encodings, and `code`
// equals `charcode`, using the glyph defined in the baseEncoding // equals `charcode`, using the glyph defined in the baseEncoding
// seems to yield a better `toUnicode` mapping (fixes issue 5070). // seems to yield a better `toUnicode` mapping (fixes issue 5070).

View File

@ -236,6 +236,7 @@
!issue4061.pdf !issue4061.pdf
!issue4668.pdf !issue4668.pdf
!PDFJS-7562-reduced.pdf !PDFJS-7562-reduced.pdf
!issue11768_reduced.pdf
!issue5039.pdf !issue5039.pdf
!issue5070.pdf !issue5070.pdf
!issue5238.pdf !issue5238.pdf

Binary file not shown.

View File

@ -3109,6 +3109,12 @@
"type": "text", "type": "text",
"about": "Invisible (and broken) TrueType font used for text-selection." "about": "Invisible (and broken) TrueType font used for text-selection."
}, },
{ "id": "issue11768",
"file": "pdfs/issue11768_reduced.pdf",
"md5": "0cafde97d78bb6883531a325a996a5ef",
"rounds": 1,
"type": "eq"
},
{ "id": "issue1912", { "id": "issue1912",
"file": "pdfs/issue1912.pdf", "file": "pdfs/issue1912.pdf",
"md5": "15305b7c2cba971e7423de3f6ad38fef", "md5": "15305b7c2cba971e7423de3f6ad38fef",