|
|
@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { |
|
|
|
(typeof window !== 'undefined' ? window : this).PDFJS = {}; |
|
|
|
(typeof window !== 'undefined' ? window : this).PDFJS = {}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PDFJS.version = '1.1.244'; |
|
|
|
PDFJS.version = '1.1.246'; |
|
|
|
PDFJS.build = '9ad6af4'; |
|
|
|
PDFJS.build = 'e3b3481'; |
|
|
|
|
|
|
|
|
|
|
|
(function pdfjsWrapper() { |
|
|
|
(function pdfjsWrapper() { |
|
|
|
// Use strict in our context only - users might not want it
|
|
|
|
// Use strict in our context only - users might not want it
|
|
|
@ -23192,6 +23192,32 @@ var OpenTypeFileBuilder = (function OpenTypeFileBuilderClosure() { |
|
|
|
return OpenTypeFileBuilder; |
|
|
|
return OpenTypeFileBuilder; |
|
|
|
})(); |
|
|
|
})(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Problematic Unicode characters in the fonts that needs to be moved to avoid
|
|
|
|
|
|
|
|
// issues when they are painted on the canvas, e.g. complex-script shaping or
|
|
|
|
|
|
|
|
// control/whitespace characters. The ranges are listed in pairs: the first item
|
|
|
|
|
|
|
|
// is a code of the first problematic code, the second one is the next
|
|
|
|
|
|
|
|
// non-problematic code. The ranges must be in sorted order.
|
|
|
|
|
|
|
|
var ProblematicCharRanges = new Int32Array([ |
|
|
|
|
|
|
|
// Control characters.
|
|
|
|
|
|
|
|
0x0000, 0x0020, |
|
|
|
|
|
|
|
0x007F, 0x00A1, |
|
|
|
|
|
|
|
0x00AD, 0x00AE, |
|
|
|
|
|
|
|
// Chars that is used in complex-script shaping.
|
|
|
|
|
|
|
|
0x0600, 0x0780, |
|
|
|
|
|
|
|
0x08A0, 0x10A0, |
|
|
|
|
|
|
|
0x1780, 0x1800, |
|
|
|
|
|
|
|
// General punctuation chars.
|
|
|
|
|
|
|
|
0x2000, 0x2010, |
|
|
|
|
|
|
|
0x2011, 0x2012, |
|
|
|
|
|
|
|
0x2028, 0x2030, |
|
|
|
|
|
|
|
0x205F, 0x2070, |
|
|
|
|
|
|
|
0x25CC, 0x25CD, |
|
|
|
|
|
|
|
// Chars that is used in complex-script shaping.
|
|
|
|
|
|
|
|
0xAA60, 0xAA80, |
|
|
|
|
|
|
|
// Specials Unicode block.
|
|
|
|
|
|
|
|
0xFFF0, 0x10000 |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 'Font' is the class the outside world should use, it encapsulate all the font |
|
|
|
* 'Font' is the class the outside world should use, it encapsulate all the font |
|
|
|
* decoding logics whatever type it is (assuming the font type is supported). |
|
|
|
* decoding logics whatever type it is (assuming the font type is supported). |
|
|
@ -23475,33 +23501,18 @@ var Font = (function FontClosure() { |
|
|
|
* @return {boolean} |
|
|
|
* @return {boolean} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function isProblematicUnicodeLocation(code) { |
|
|
|
function isProblematicUnicodeLocation(code) { |
|
|
|
if (code <= 0x1F) { // Control chars
|
|
|
|
// Using binary search to find a range start.
|
|
|
|
return true; |
|
|
|
var i = 0, j = ProblematicCharRanges.length - 1; |
|
|
|
} |
|
|
|
while (i < j) { |
|
|
|
if (code >= 0x80 && code <= 0x9F) { // Control chars
|
|
|
|
var c = (i + j + 1) >> 1; |
|
|
|
return true; |
|
|
|
if (code < ProblematicCharRanges[c]) { |
|
|
|
} |
|
|
|
j = c - 1; |
|
|
|
if ((code >= 0x2000 && code <= 0x200F) || // General punctuation chars
|
|
|
|
} else { |
|
|
|
(code >= 0x2028 && code <= 0x202F) || |
|
|
|
i = c; |
|
|
|
(code >= 0x2060 && code <= 0x206F)) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (code >= 0xFFF0 && code <= 0xFFFF) { // Specials Unicode block
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
switch (code) { |
|
|
|
|
|
|
|
case 0x7F: // Control char
|
|
|
|
|
|
|
|
case 0xA0: // Non breaking space
|
|
|
|
|
|
|
|
case 0xAD: // Soft hyphen
|
|
|
|
|
|
|
|
case 0x2011: // Non breaking hyphen
|
|
|
|
|
|
|
|
case 0x205F: // Medium mathematical space
|
|
|
|
|
|
|
|
case 0x25CC: // Dotted circle (combining mark)
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if ((code & ~0xFF) === 0x0E00) { // Thai/Lao chars (with combining mark)
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
// Even index means code in problematic range.
|
|
|
|
|
|
|
|
return !(i & 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|