From: Vivien Nicolas <21@vingtetun.org> Date: Mon, 5 Sep 2011 19:01:39 +0000 (+0200) Subject: Length[1-2] can be a reference X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3c77972b8eb5b8d8bf6708ef67cc0c317ef06ece;p=pdf.js.git Length[1-2] can be a reference --- diff --git a/fonts.js b/fonts.js index d199402..3234fa1 100755 --- 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);