mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 23:28:06 +02:00
Convert uniXXXX
glyph names to proper ones when building the charCodeToGlyphId
map for TrueType fonts (bug 1132849, issue 6893, issue 6894)
This patch adds a `getUnicodeForGlyph` helper function, which is used to recover Unicode values for non-standard glyph names. Some PDF generators, e.g. Scribus PDF, use improper `uniXXXX` glyph names which breaks the glyph mapping. We can avoid this by converting them to "standard" glyph names instead. Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1132849. Fixes 6893. Fixes 6894.
This commit is contained in:
parent
147598417c
commit
dfe9015a43
6 changed files with 96 additions and 10 deletions
2
test/pdfs/.gitignore
vendored
2
test/pdfs/.gitignore
vendored
|
@ -32,6 +32,8 @@
|
|||
!bug1200096.pdf
|
||||
!issue5564_reduced.pdf
|
||||
!canvas.pdf
|
||||
!bug1132849.pdf
|
||||
!issue6894.pdf
|
||||
!issue5804.pdf
|
||||
!ShowText-ShadingPattern.pdf
|
||||
!complex_ttf_font.pdf
|
||||
|
|
BIN
test/pdfs/bug1132849.pdf
Normal file
BIN
test/pdfs/bug1132849.pdf
Normal file
Binary file not shown.
BIN
test/pdfs/issue6894.pdf
Normal file
BIN
test/pdfs/issue6894.pdf
Normal file
Binary file not shown.
|
@ -728,6 +728,20 @@
|
|||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "bug1132849",
|
||||
"file": "pdfs/bug1132849.pdf",
|
||||
"md5": "aedfbead1f8feb35cf2e38b279133b47",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue6894",
|
||||
"file": "pdfs/issue6894.pdf",
|
||||
"md5": "bb84f2025c11f23cf436170049f81215",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "personwithdog",
|
||||
"file": "pdfs/personwithdog.pdf",
|
||||
"md5": "cd68fb2ce00dab97801b3e51495b99e3",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue