]> git.parisson.com Git - pdf.js.git/commitdiff
Length[1-2] can be a reference
authorVivien Nicolas <21@vingtetun.org>
Mon, 5 Sep 2011 19:01:39 +0000 (21:01 +0200)
committerVivien Nicolas <21@vingtetun.org>
Mon, 5 Sep 2011 19:01:39 +0000 (21:01 +0200)
fonts.js

index d199402982bf3b970e27208a7dc0abd8e3051c76..3234fa1d3d08be1c1ba6e9d486b88e3b25011871 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -1828,7 +1828,12 @@ var type1Parser = new Type1Parser();
 var CFF = function(name, file, properties) {
   // Get the data block containing glyphs and subrs informations
   var length1 = file.dict.get('Length1');
+  if (!IsNum(length1))
+    length1 = length1.num;
+
   var length2 = file.dict.get('Length2');
+  if (!IsNum(length2))
+    length2 = length2.num;
 
   var headerBlock = file.getBytes(length1);
   type1Parser.extractFontHeader(headerBlock, properties);