|
|
@ -481,7 +481,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
var toUnicode = dict.get('ToUnicode') || |
|
|
|
var toUnicode = dict.get('ToUnicode') || |
|
|
|
baseDict.get('ToUnicode'); |
|
|
|
baseDict.get('ToUnicode'); |
|
|
|
if (toUnicode) |
|
|
|
if (toUnicode) |
|
|
|
properties.toUnicode = this.readToUnicode(toUnicode, xref); |
|
|
|
properties.toUnicode = this.readToUnicode(toUnicode, xref, properties); |
|
|
|
|
|
|
|
|
|
|
|
if (properties.composite) { |
|
|
|
if (properties.composite) { |
|
|
|
// CIDSystemInfo helps to match CID to glyphs
|
|
|
|
// CIDSystemInfo helps to match CID to glyphs
|
|
|
@ -537,7 +537,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
properties.hasEncoding = hasEncoding; |
|
|
|
properties.hasEncoding = hasEncoding; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
readToUnicode: function PartialEvaluator_readToUnicode(toUnicode, xref) { |
|
|
|
readToUnicode: function PartialEvaluator_readToUnicode(toUnicode, xref, |
|
|
|
|
|
|
|
properties) { |
|
|
|
var cmapObj = toUnicode; |
|
|
|
var cmapObj = toUnicode; |
|
|
|
var charToUnicode = []; |
|
|
|
var charToUnicode = []; |
|
|
|
if (isName(cmapObj)) { |
|
|
|
if (isName(cmapObj)) { |
|
|
@ -626,6 +627,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (octet == 0x3E) { |
|
|
|
} else if (octet == 0x3E) { |
|
|
|
if (token.length) { |
|
|
|
if (token.length) { |
|
|
|
|
|
|
|
// XXX guessing chars size by checking number size in the CMap
|
|
|
|
|
|
|
|
if (token.length <= 2 && properties.composite) |
|
|
|
|
|
|
|
properties.wideChars = false; |
|
|
|
|
|
|
|
|
|
|
|
if (token.length <= 4) { |
|
|
|
if (token.length <= 4) { |
|
|
|
// parsing hex number
|
|
|
|
// parsing hex number
|
|
|
|
tokens.push(parseInt(token, 16)); |
|
|
|
tokens.push(parseInt(token, 16)); |
|
|
@ -843,6 +848,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { |
|
|
|
length1: length1, |
|
|
|
length1: length1, |
|
|
|
length2: length2, |
|
|
|
length2: length2, |
|
|
|
composite: composite, |
|
|
|
composite: composite, |
|
|
|
|
|
|
|
wideChars: composite, |
|
|
|
fixedPitch: false, |
|
|
|
fixedPitch: false, |
|
|
|
fontMatrix: dict.get('FontMatrix') || IDENTITY_MATRIX, |
|
|
|
fontMatrix: dict.get('FontMatrix') || IDENTITY_MATRIX, |
|
|
|
firstChar: firstChar || 0, |
|
|
|
firstChar: firstChar || 0, |
|
|
|