]> git.parisson.com Git - pdf.js.git/commitdiff
extracted filetype in pdf.js instead of fonts.js
authorsbarman <sbarman@L3CWZ5T.(none)>
Wed, 20 Jul 2011 18:25:00 +0000 (11:25 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Wed, 20 Jul 2011 18:25:00 +0000 (11:25 -0700)
fonts.js
pdf.js

index 8cbe6fe2f35c79fb982c09eea4f8105be9a59f24..e241bb2f99cd52a26a40cfc328e7a0e14525ff09 100755 (executable)
--- 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 281adfe40beec50fa9d37eea5adf6ce6c69c1916..5ce22955c2ff410554ea1190ed339210fa1a9b98 100644 (file)
--- 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'),