Browse Source

Merge pull request #4701 from Snuffleupagus/issue-4650

Prevent trying to map characters to the specials unicode block in adjustMapping (issue 4650)
Yury Delendik 11 years ago
parent
commit
75d6792092
  1. 2
      src/core/fonts.js
  2. 1
      test/pdfs/.gitignore
  3. BIN
      test/pdfs/issue4650.pdf
  4. 9
      test/test_manifest.json

2
src/core/fonts.js

@ -2459,6 +2459,8 @@ var Font = (function FontClosure() {
fontCharCode === 0x7F || // Control char fontCharCode === 0x7F || // Control char
fontCharCode === 0xAD || // Soft hyphen fontCharCode === 0xAD || // Soft hyphen
(fontCharCode >= 0x80 && fontCharCode <= 0x9F) || // Control chars (fontCharCode >= 0x80 && fontCharCode <= 0x9F) || // Control chars
// Prevent drawing characters in the specials unicode block.
(fontCharCode >= 0xFFF0 && fontCharCode <= 0xFFFF) ||
(isSymbolic && isIdentityUnicode)) && (isSymbolic && isIdentityUnicode)) &&
nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END) { // Room left. nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END) { // Room left.
// Loop to try and find a free spot in the private use area. // Loop to try and find a free spot in the private use area.

1
test/pdfs/.gitignore vendored

@ -64,6 +64,7 @@
!noembed-sjis.pdf !noembed-sjis.pdf
!vertical.pdf !vertical.pdf
!bug878026.pdf !bug878026.pdf
!issue4650.pdf
!issue3025.pdf !issue3025.pdf
!issue2099-1.pdf !issue2099-1.pdf
!issue3371.pdf !issue3371.pdf

BIN
test/pdfs/issue4650.pdf

Binary file not shown.

9
test/test_manifest.json

@ -430,6 +430,15 @@
"rounds": 1, "rounds": 1,
"type": "eq" "type": "eq"
}, },
{ "id": "issue4650",
"file": "pdfs/issue4650.pdf",
"md5": "ad736804f57f9f96f5ac108e514e1686",
"rounds": 1,
"link": false,
"firstPage": 1,
"lastPage": 1,
"type": "eq"
},
{ "id": "txt2pdf", { "id": "txt2pdf",
"file": "pdfs/txt2pdf.pdf", "file": "pdfs/txt2pdf.pdf",
"md5": "02cefa0f5e8d96313bb05163b2f88c8c", "md5": "02cefa0f5e8d96313bb05163b2f88c8c",

Loading…
Cancel
Save