@ -7078,8 +7078,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
@@ -7078,8 +7078,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
} ( ) ;
var version , build ;
{
exports . version = version = '1.8.595 ' ;
exports . build = build = '5b7f712 c' ;
exports . version = version = '1.8.597 ' ;
exports . build = build = 'e20d4a9 c' ;
}
exports . getDocument = getDocument ;
exports . LoopbackPort = LoopbackPort ;
@ -28185,8 +28185,8 @@ if (!_util.globalScope.PDFJS) {
@@ -28185,8 +28185,8 @@ if (!_util.globalScope.PDFJS) {
}
var PDFJS = _util . globalScope . PDFJS ;
{
PDFJS . version = '1.8.595 ' ;
PDFJS . build = '5b7f712 c' ;
PDFJS . version = '1.8.597 ' ;
PDFJS . build = 'e20d4a9 c' ;
}
PDFJS . pdfBug = false ;
if ( PDFJS . verbosity !== undefined ) {
@ -35030,9 +35030,7 @@ var OpenTypeFileBuilder = function OpenTypeFileBuilderClosure() {
@@ -35030,9 +35030,7 @@ var OpenTypeFileBuilder = function OpenTypeFileBuilderClosure() {
var ProblematicCharRanges = new Int32Array ( [ 0x0000 , 0x0020 , 0x007F , 0x00A1 , 0x00AD , 0x00AE , 0x0600 , 0x0780 , 0x08A0 , 0x10A0 , 0x1780 , 0x1800 , 0x1C00 , 0x1C50 , 0x2000 , 0x2010 , 0x2011 , 0x2012 , 0x2028 , 0x2030 , 0x205F , 0x2070 , 0x25CC , 0x25CD , 0x3000 , 0x3001 , 0x3164 , 0x3165 , 0xAA60 , 0xAA80 , 0xFFF0 , 0x10000 ] ) ;
var Font = function FontClosure ( ) {
function Font ( name , file , properties ) {
var _this = this ;
var charCode , glyphName , unicode ;
var charCode ;
this . name = name ;
this . loadedName = properties . loadedName ;
this . isType3Font = properties . isType3Font ;
@ -35045,6 +35043,7 @@ var Font = function FontClosure() {
@@ -35045,6 +35043,7 @@ var Font = function FontClosure() {
var type = properties . type ;
var subtype = properties . subtype ;
this . type = type ;
this . subtype = subtype ;
this . fallbackName = this . isMonospace ? 'monospace' : this . isSerifFont ? 'serif' : 'sans-serif' ;
this . differences = properties . differences ;
this . widths = properties . widths ;
@ -35056,6 +35055,7 @@ var Font = function FontClosure() {
@@ -35056,6 +35055,7 @@ var Font = function FontClosure() {
this . descent = properties . descent / PDF _GLYPH _SPACE _UNITS ;
this . fontMatrix = properties . fontMatrix ;
this . bbox = properties . bbox ;
this . defaultEncoding = properties . defaultEncoding ;
this . toUnicode = properties . toUnicode ;
this . toFontChar = [ ] ;
if ( properties . type === 'Type3' ) {
@ -35071,66 +35071,11 @@ var Font = function FontClosure() {
@@ -35071,66 +35071,11 @@ var Font = function FontClosure() {
this . vmetrics = properties . vmetrics ;
this . defaultVMetrics = properties . defaultVMetrics ;
}
var glyphsUnicodeMap ;
if ( ! file || file . isEmpty ) {
if ( file ) {
( 0 , _util . warn ) ( 'Font file is empty in "' + name + '" (' + this . loadedName + ')' ) ;
}
this . missingFile = true ;
var fontName = name . replace ( /[,_]/g , '-' ) ;
var stdFontMap = ( 0 , _standard _fonts . getStdFontMap ) ( ) ,
nonStdFontMap = ( 0 , _standard _fonts . getNonStdFontMap ) ( ) ;
var isStandardFont = ! ! stdFontMap [ fontName ] || ! ! ( nonStdFontMap [ fontName ] && stdFontMap [ nonStdFontMap [ fontName ] ] ) ;
fontName = stdFontMap [ fontName ] || nonStdFontMap [ fontName ] || fontName ;
this . bold = fontName . search ( /bold/gi ) !== - 1 ;
this . italic = fontName . search ( /oblique/gi ) !== - 1 || fontName . search ( /italic/gi ) !== - 1 ;
this . black = name . search ( /Black/g ) !== - 1 ;
this . remeasure = Object . keys ( this . widths ) . length > 0 ;
if ( isStandardFont && type === 'CIDFontType2' && properties . cidEncoding . indexOf ( 'Identity-' ) === 0 ) {
var GlyphMapForStandardFonts = ( 0 , _standard _fonts . getGlyphMapForStandardFonts ) ( ) ;
var map = [ ] ;
for ( charCode in GlyphMapForStandardFonts ) {
map [ + charCode ] = GlyphMapForStandardFonts [ charCode ] ;
}
if ( /Arial-?Black/i . test ( name ) ) {
var SupplementalGlyphMapForArialBlack = ( 0 , _standard _fonts . getSupplementalGlyphMapForArialBlack ) ( ) ;
for ( charCode in SupplementalGlyphMapForArialBlack ) {
map [ + charCode ] = SupplementalGlyphMapForArialBlack [ charCode ] ;
}
}
var isIdentityUnicode = this . toUnicode instanceof IdentityToUnicodeMap ;
if ( ! isIdentityUnicode ) {
this . toUnicode . forEach ( function ( charCode , unicodeCharCode ) {
map [ + charCode ] = unicodeCharCode ;
} ) ;
}
this . toFontChar = map ;
this . toUnicode = new ToUnicodeMap ( map ) ;
} else if ( /Symbol/i . test ( fontName ) ) {
this . toFontChar = buildToFontChar ( _encodings . SymbolSetEncoding , ( 0 , _glyphlist . getGlyphsUnicode ) ( ) , properties . differences ) ;
} else if ( /Dingbats/i . test ( fontName ) ) {
if ( /Wingdings/i . test ( name ) ) {
( 0 , _util . warn ) ( 'Non-embedded Wingdings font, falling back to ZapfDingbats.' ) ;
}
this . toFontChar = buildToFontChar ( _encodings . ZapfDingbatsEncoding , ( 0 , _glyphlist . getDingbatsGlyphsUnicode ) ( ) , properties . differences ) ;
} else if ( isStandardFont ) {
this . toFontChar = buildToFontChar ( properties . defaultEncoding , ( 0 , _glyphlist . getGlyphsUnicode ) ( ) , properties . differences ) ;
} else {
glyphsUnicodeMap = ( 0 , _glyphlist . getGlyphsUnicode ) ( ) ;
this . toUnicode . forEach ( function ( charCode , unicodeCharCode ) {
if ( ! _this . composite ) {
glyphName = properties . differences [ charCode ] || properties . defaultEncoding [ charCode ] ;
unicode = ( 0 , _unicode . getUnicodeForGlyph ) ( glyphName , glyphsUnicodeMap ) ;
if ( unicode !== - 1 ) {
unicodeCharCode = unicode ;
}
}
_this . toFontChar [ charCode ] = unicodeCharCode ;
} ) ;
}
this . loadedName = fontName . split ( '-' ) [ 0 ] ;
this . loading = false ;
this . fontType = getFontType ( type , subtype ) ;
this . fallbackToSystemFont ( ) ;
return ;
}
if ( subtype === 'Type1C' ) {
@ -35159,6 +35104,7 @@ var Font = function FontClosure() {
@@ -35159,6 +35104,7 @@ var Font = function FontClosure() {
if ( subtype === 'OpenType' && type !== 'OpenType' ) {
type = 'OpenType' ;
}
try {
var data ;
switch ( type ) {
case 'MMType1' :
@ -35183,6 +35129,14 @@ var Font = function FontClosure() {
@@ -35183,6 +35129,14 @@ var Font = function FontClosure() {
default :
throw new _util . FormatError ( 'Font ' + type + ' is not supported' ) ;
}
} catch ( e ) {
if ( ! ( e instanceof _util . FormatError ) ) {
throw e ;
}
( 0 , _util . warn ) ( e ) ;
this . fallbackToSystemFont ( ) ;
return ;
}
this . data = data ;
this . fontType = getFontType ( type , subtype ) ;
this . fontMatrix = properties . fontMatrix ;
@ -35275,6 +35229,9 @@ var Font = function FontClosure() {
@@ -35275,6 +35229,9 @@ var Font = function FontClosure() {
for ( var originalCharCode in charCodeToGlyphId ) {
originalCharCode |= 0 ;
var glyphId = charCodeToGlyphId [ originalCharCode ] ;
if ( missingGlyphs [ glyphId ] ) {
continue ;
}
var fontCharCode = originalCharCode ;
var hasUnicodeValue = false ;
if ( ! isIdentityUnicode && toUnicode . has ( originalCharCode ) ) {
@ -35284,14 +35241,18 @@ var Font = function FontClosure() {
@@ -35284,14 +35241,18 @@ var Font = function FontClosure() {
fontCharCode = unicode . charCodeAt ( 0 ) ;
}
}
if ( ! missingGlyphs [ glyphId ] && ( usedFontCharCodes [ fontCharCode ] !== undefined || isProblematicUnicodeLocation ( fontCharCode ) || isSymbolic && ! hasUnicodeValue ) && nextAvailableFontCharCode <= PRIVATE _USE _OFFSET _END ) {
if ( usedFontCharCodes [ fontCharCode ] !== undefined || isProblematicUnicodeLocation ( fontCharCode ) || isSymbolic && ! hasUnicodeValue ) {
do {
if ( nextAvailableFontCharCode > PRIVATE _USE _OFFSET _END ) {
( 0 , _util . warn ) ( 'Ran out of space in font private use area.' ) ;
break ;
}
fontCharCode = nextAvailableFontCharCode ++ ;
if ( SKIP _PRIVATE _USE _RANGE _F000 _TO _F01F && fontCharCode === 0xF000 ) {
fontCharCode = 0xF020 ;
nextAvailableFontCharCode = fontCharCode + 1 ;
}
} while ( usedFontCharCodes [ fontCharCode ] !== undefined && nextAvailableFontCharCode <= PRIVATE _USE _OFFSET _END ) ;
} while ( usedFontCharCodes [ fontCharCode ] !== undefined ) ;
}
newMap [ fontCharCode ] = glyphId ;
toFontChar [ originalCharCode ] = fontCharCode ;
@ -35314,6 +35275,12 @@ var Font = function FontClosure() {
@@ -35314,6 +35275,12 @@ var Font = function FontClosure() {
glyphId : glyphs [ charCode ]
} ) ;
}
if ( codes . length === 0 ) {
codes . push ( {
fontCharCode : 0 ,
glyphId : 0
} ) ;
}
codes . sort ( function fontGetRangesSort ( a , b ) {
return a . fontCharCode - b . fontCharCode ;
} ) ;
@ -35548,6 +35515,69 @@ var Font = function FontClosure() {
@@ -35548,6 +35515,69 @@ var Font = function FontClosure() {
}
return data ;
} ,
fallbackToSystemFont : function Font _fallbackToSystemFont ( ) {
var _this = this ;
this . missingFile = true ;
var charCode , unicode ;
var name = this . name ;
var type = this . type ;
var subtype = this . subtype ;
var fontName = name . replace ( /[,_]/g , '-' ) ;
var stdFontMap = ( 0 , _standard _fonts . getStdFontMap ) ( ) ,
nonStdFontMap = ( 0 , _standard _fonts . getNonStdFontMap ) ( ) ;
var isStandardFont = ! ! stdFontMap [ fontName ] || ! ! ( nonStdFontMap [ fontName ] && stdFontMap [ nonStdFontMap [ fontName ] ] ) ;
fontName = stdFontMap [ fontName ] || nonStdFontMap [ fontName ] || fontName ;
this . bold = fontName . search ( /bold/gi ) !== - 1 ;
this . italic = fontName . search ( /oblique/gi ) !== - 1 || fontName . search ( /italic/gi ) !== - 1 ;
this . black = name . search ( /Black/g ) !== - 1 ;
this . remeasure = Object . keys ( this . widths ) . length > 0 ;
if ( isStandardFont && type === 'CIDFontType2' && this . cidEncoding . indexOf ( 'Identity-' ) === 0 ) {
var GlyphMapForStandardFonts = ( 0 , _standard _fonts . getGlyphMapForStandardFonts ) ( ) ;
var map = [ ] ;
for ( charCode in GlyphMapForStandardFonts ) {
map [ + charCode ] = GlyphMapForStandardFonts [ charCode ] ;
}
if ( /Arial-?Black/i . test ( name ) ) {
var SupplementalGlyphMapForArialBlack = ( 0 , _standard _fonts . getSupplementalGlyphMapForArialBlack ) ( ) ;
for ( charCode in SupplementalGlyphMapForArialBlack ) {
map [ + charCode ] = SupplementalGlyphMapForArialBlack [ charCode ] ;
}
}
var isIdentityUnicode = this . toUnicode instanceof IdentityToUnicodeMap ;
if ( ! isIdentityUnicode ) {
this . toUnicode . forEach ( function ( charCode , unicodeCharCode ) {
map [ + charCode ] = unicodeCharCode ;
} ) ;
}
this . toFontChar = map ;
this . toUnicode = new ToUnicodeMap ( map ) ;
} else if ( /Symbol/i . test ( fontName ) ) {
this . toFontChar = buildToFontChar ( _encodings . SymbolSetEncoding , ( 0 , _glyphlist . getGlyphsUnicode ) ( ) , this . differences ) ;
} else if ( /Dingbats/i . test ( fontName ) ) {
if ( /Wingdings/i . test ( name ) ) {
( 0 , _util . warn ) ( 'Non-embedded Wingdings font, falling back to ZapfDingbats.' ) ;
}
this . toFontChar = buildToFontChar ( _encodings . ZapfDingbatsEncoding , ( 0 , _glyphlist . getDingbatsGlyphsUnicode ) ( ) , this . differences ) ;
} else if ( isStandardFont ) {
this . toFontChar = buildToFontChar ( this . defaultEncoding , ( 0 , _glyphlist . getGlyphsUnicode ) ( ) , this . differences ) ;
} else {
var glyphsUnicodeMap = ( 0 , _glyphlist . getGlyphsUnicode ) ( ) ;
this . toUnicode . forEach ( function ( charCode , unicodeCharCode ) {
if ( ! _this . composite ) {
var glyphName = _this . differences [ charCode ] || _this . defaultEncoding [ charCode ] ;
unicode = ( 0 , _unicode . getUnicodeForGlyph ) ( glyphName , glyphsUnicodeMap ) ;
if ( unicode !== - 1 ) {
unicodeCharCode = unicode ;
}
}
_this . toFontChar [ charCode ] = unicodeCharCode ;
} ) ;
}
this . loadedName = fontName . split ( '-' ) [ 0 ] ;
this . loading = false ;
this . fontType = getFontType ( type , subtype ) ;
} ,
checkAndRepair : function Font _checkAndRepair ( name , font , properties ) {
function readTableEntry ( file ) {
var tag = ( 0 , _util . bytesToString ) ( file . getBytes ( 4 ) ) ;
@ -35847,7 +35877,7 @@ var Font = function FontClosure() {
@@ -35847,7 +35877,7 @@ var Font = function FontClosure() {
data [ 50 ] = 0 ;
data [ 51 ] = 1 ;
} else {
( 0 , _util . warn ) ( 'Could not fix indexToLocFormat: ' + indexToLocFormat ) ;
throw new _util . FormatError ( 'Could not fix indexToLocFormat: ' + indexToLocFormat ) ;
}
}
}
@ -35887,7 +35917,6 @@ var Font = function FontClosure() {
@@ -35887,7 +35917,6 @@ var Font = function FontClosure() {
var startOffset = itemDecode ( locaData , 0 ) ;
var writeOffset = 0 ;
var missingGlyphData = Object . create ( null ) ;
missingGlyphData [ 0 ] = true ;
itemEncode ( locaData , 0 , writeOffset ) ;
var i , j ;
var locaCount = dupFirstEntry ? numGlyphs - 1 : numGlyphs ;
@ -36464,9 +36493,6 @@ var Font = function FontClosure() {
@@ -36464,9 +36493,6 @@ var Font = function FontClosure() {
found = true ;
}
}
if ( ! found ) {
charCodeToGlyphId [ charCode ] = 0 ;
}
}
} else if ( cmapPlatformId === 0 && cmapEncodingId === 0 ) {
for ( i = 0 ; i < cmapMappingsLength ; ++ i ) {
@ -47657,8 +47683,8 @@ exports.PDFDataTransportStream = PDFDataTransportStream;
@@ -47657,8 +47683,8 @@ exports.PDFDataTransportStream = PDFDataTransportStream;
"use strict" ;
var pdfjsVersion = '1.8.595 ' ;
var pdfjsBuild = '5b7f712 c' ;
var pdfjsVersion = '1.8.597 ' ;
var pdfjsBuild = 'e20d4a9 c' ;
var pdfjsSharedUtil = _ _w _pdfjs _require _ _ ( 0 ) ;
var pdfjsDisplayGlobal = _ _w _pdfjs _require _ _ ( 24 ) ;
var pdfjsDisplayAPI = _ _w _pdfjs _require _ _ ( 7 ) ;