mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
commit
de9f0a9435
3 changed files with 23 additions and 0 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');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue