From 8763002c4452dd51036de0b5a283171489f0639a Mon Sep 17 00:00:00 2001 From: sbarman Date: Wed, 20 Jul 2011 11:25:00 -0700 Subject: [PATCH] extracted filetype in pdf.js instead of fonts.js --- fonts.js | 4 ++-- pdf.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fonts.js b/fonts.js index 8cbe6fe2f..e241bb2f9 100755 --- a/fonts.js +++ b/fonts.js @@ -392,8 +392,8 @@ var Font = (function() { case 'CIDFontType0': this.mimetype = 'font/opentype'; - var subtype = file.dict.get('Subtype'); - if (subtype && subtype.name === 'Type1C') { + var subtype = properties.subtype; + if (subtype === 'Type1C') { var cff = new Type2CFF(file); } else { var cff = new CFF(name, file, properties); diff --git a/pdf.js b/pdf.js index 281adfe40..5ce22955c 100644 --- a/pdf.js +++ b/pdf.js @@ -3814,8 +3814,15 @@ var PartialEvaluator = (function() { } } + if (fontFile && fontFile.dict) { + var fileType = fontFile.dict.get('Subtype'); + if (fileType) + fileType = fileType.name; + } + var properties = { type: subType.name, + subtype: fileType, encoding: encodingMap, charset: charset, firstChar: fontDict.get('FirstChar'),