mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #921 from notmasteryet/isssue-919
(#919) Fixing toUnicode mapping for TrueType fonts with identity mapping
This commit is contained in:
commit
f56363234f
3 changed files with 13 additions and 0 deletions
|
@ -1791,6 +1791,10 @@ var Font = (function FontClosure() {
|
|||
var i = unassignedUnicodeItems[j];
|
||||
while (unusedUnicode in usedUnicodes)
|
||||
unusedUnicode++;
|
||||
var cid = i + 1;
|
||||
// override only if unicode mapping is not specified
|
||||
if (!(cid in toUnicode))
|
||||
toUnicode[cid] = unusedUnicode;
|
||||
glyphs[i].unicode = unusedUnicode++;
|
||||
}
|
||||
this.useToUnicode = true;
|
||||
|
|
1
test/pdfs/issue919.pdf.link
Normal file
1
test/pdfs/issue919.pdf.link
Normal file
|
@ -0,0 +1 @@
|
|||
http://agb.traviangames.com/Travian_AR_Terms.pdf
|
|
@ -340,5 +340,13 @@
|
|||
"link": true,
|
||||
"pageLimit": 3,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue919",
|
||||
"file": "pdfs/issue919.pdf",
|
||||
"md5": "3a1716a512aca4d7a8d6106bd4885d14",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"pageLimit": 3,
|
||||
"type": "eq"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue