mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Fix handling of symbolic fonts and unicode cmaps.
In issue 12120, the font has a 1,0 cmap and is marked symbolic which according to the spec means we should directly use the cmap instead of the extra steps that are defined in 9.6.6.4. However, just fixing that caused bug 1057544 to break. The font in bug 1057544 has a 0,1 cmap (Unicode 1.1) which we were not using, but is easy to support. We're also easily able to support some of the other unicode cmaps, so I added those as well. There was also a second issue with bug 1057544, the cmap doesn't have a mapping for the "quoteright" glyph, but it is defined in the post table. To handle this, I've moved post table as a fallback for any font that has an encoding.
This commit is contained in:
parent
0d5ef5dd0a
commit
45e8a31cc0
5 changed files with 49 additions and 39 deletions
2
test/pdfs/.gitignore
vendored
2
test/pdfs/.gitignore
vendored
|
@ -88,6 +88,7 @@
|
|||
!issue10665_reduced.pdf
|
||||
!issue11016_reduced.pdf
|
||||
!issue11045.pdf
|
||||
!bug1057544.pdf
|
||||
!issue11150_reduced.pdf
|
||||
!issue11242_reduced.pdf
|
||||
!issue11279.pdf
|
||||
|
@ -192,6 +193,7 @@
|
|||
!issue4260_reduced.pdf
|
||||
!bug1250079.pdf
|
||||
!bug1473809.pdf
|
||||
!issue12120_reduced.pdf
|
||||
!pdfjsbad1586.pdf
|
||||
!freeculture.pdf
|
||||
!issue6006.pdf
|
||||
|
|
BIN
test/pdfs/bug1057544.pdf
Normal file
BIN
test/pdfs/bug1057544.pdf
Normal file
Binary file not shown.
BIN
test/pdfs/issue12120_reduced.pdf
Normal file
BIN
test/pdfs/issue12120_reduced.pdf
Normal file
Binary file not shown.
|
@ -1991,6 +1991,12 @@
|
|||
"type": "eq",
|
||||
"about": "MediaBox and CropBox with indirect objects."
|
||||
},
|
||||
{ "id": "bug1057544",
|
||||
"file": "pdfs/bug1057544.pdf",
|
||||
"md5": "49ad71b82ead1ee0fe4ddb41aa9e30b4",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue2642",
|
||||
"file": "pdfs/issue2642.pdf",
|
||||
"md5": "b6679861fdce3bbab0c1fa51bb7f5077",
|
||||
|
@ -4204,6 +4210,12 @@
|
|||
"lastPage": 2,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue12120_reduced",
|
||||
"file": "pdfs/issue12120_reduced.pdf",
|
||||
"md5": "b4570dcee26ac3121ad3322e19ed1a6a",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue4883",
|
||||
"file": "pdfs/issue4883.pdf",
|
||||
"md5": "2fac0d9a189ca5fcef8626153d050be8",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue