Browse Source

Merge pull request #5998 from Snuffleupagus/issue-5994

Don't map glyphs to certain problematic Thai/Lao Unicode locations (issue 5994)
Brendan Dahl 10 years ago
parent
commit
c205b809a5
  1. 4
      src/core/fonts.js
  2. 1
      test/pdfs/.gitignore
  3. 19600
      test/pdfs/issue5994.pdf
  4. 7
      test/test_manifest.json

4
src/core/fonts.js

@ -2697,12 +2697,14 @@ var Font = (function FontClosure() {
case 0x7F: // Control char case 0x7F: // Control char
case 0xA0: // Non breaking space case 0xA0: // Non breaking space
case 0xAD: // Soft hyphen case 0xAD: // Soft hyphen
case 0x0E33: // Thai character SARA AM
case 0x2011: // Non breaking hyphen case 0x2011: // Non breaking hyphen
case 0x205F: // Medium mathematical space case 0x205F: // Medium mathematical space
case 0x25CC: // Dotted circle (combining mark) case 0x25CC: // Dotted circle (combining mark)
return true; return true;
} }
if ((code & ~0xFF) === 0x0E00) { // Thai/Lao chars (with combining mark)
return true;
}
return false; return false;
} }

1
test/pdfs/.gitignore vendored

@ -56,6 +56,7 @@
!issue5734.pdf !issue5734.pdf
!issue4875.pdf !issue4875.pdf
!issue4881.pdf !issue4881.pdf
!issue5994.pdf
!rotated.pdf !rotated.pdf
!issue1249.pdf !issue1249.pdf
!issue1171.pdf !issue1171.pdf

19600
test/pdfs/issue5994.pdf

File diff suppressed because one or more lines are too long

7
test/test_manifest.json

@ -1081,6 +1081,13 @@
"rounds": 1, "rounds": 1,
"type": "eq" "type": "eq"
}, },
{ "id": "issue5994",
"file": "pdfs/issue5994.pdf",
"md5": "6799733a39d29b3828d6628bf2c5c382",
"rounds": 1,
"link": false,
"type": "eq"
},
{ "id": "zerowidthline", { "id": "zerowidthline",
"file": "pdfs/zerowidthline.pdf", "file": "pdfs/zerowidthline.pdf",
"md5": "295d26e61a85635433f8e4b768953f60", "md5": "295d26e61a85635433f8e4b768953f60",

Loading…
Cancel
Save