mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge remote-tracking branch 'mozilla/master' into cidtype2
Conflicts: test/test_manifest.json
This commit is contained in:
commit
32938d3a66
4 changed files with 24 additions and 1 deletions
13
src/fonts.js
13
src/fonts.js
|
@ -412,6 +412,7 @@ var CMapConverterList = {
|
|||
'EUC-H': eucjpToUnicode,
|
||||
'EUC-V': eucjpToUnicode,
|
||||
'83pv-RKSJ-H': sjis83pvToUnicode,
|
||||
'90pv-RKSJ-H': sjis90pvToUnicode,
|
||||
'90ms-RKSJ-H': sjisToUnicode,
|
||||
'90ms-RKSJ-V': sjisToUnicode,
|
||||
'90msp-RKSJ-H': sjisToUnicode,
|
||||
|
@ -479,6 +480,18 @@ function sjis83pvToUnicode(str) {
|
|||
}
|
||||
}
|
||||
|
||||
function sjis90pvToUnicode(str) {
|
||||
var bytes = stringToBytes(str);
|
||||
try {
|
||||
// TODO: 90pv has incompatible mappings in 8740..879c and eb41..ee9c.
|
||||
return decodeBytes(bytes, 'shift_jis', true);
|
||||
} catch (e) {
|
||||
TODO('Unsupported 90pv character found');
|
||||
// Just retry without checking errors for now.
|
||||
return decodeBytes(bytes, 'shift_jis');
|
||||
}
|
||||
}
|
||||
|
||||
function gbkToUnicode(str) {
|
||||
return decodeBytes(stringToBytes(str), 'gbk');
|
||||
}
|
||||
|
|
|
@ -796,7 +796,7 @@ var NameTree = (function NameTreeClosure() {
|
|||
var queue = [this.root];
|
||||
while (queue.length > 0) {
|
||||
var i, n;
|
||||
var obj = xref.fetch(queue.shift());
|
||||
var obj = xref.fetchIfRef(queue.shift());
|
||||
if (obj.has('Kids')) {
|
||||
var kids = obj.get('Kids');
|
||||
for (i = 0, n = kids.length; i < n; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue