mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
A couple of small String.fromCodePoint
improvements (PR 11698 and 11769 follow-up)
- Add a reduced test-case for issue 11768, to prevent future regressions. (Given that PR 11769 is only a work-around, rather than a proper solution, it may not be entirely accurate for the issue to be closed as fixed.) - Add more validation of the charCode, as found by the heuristics, in `PartialEvaluator._buildSimpleFontToUnicode` to prevent future issues.
This commit is contained in:
parent
50bc4a18e8
commit
44b4a74f48
4 changed files with 8 additions and 1 deletions
|
@ -2587,7 +2587,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
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`
|
||||
// equals `charcode`, using the glyph defined in the baseEncoding
|
||||
// seems to yield a better `toUnicode` mapping (fixes issue 5070).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue