From 3c77972b8eb5b8d8bf6708ef67cc0c317ef06ece Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Mon, 5 Sep 2011 21:01:39 +0200 Subject: [PATCH] Length[1-2] can be a reference --- fonts.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fonts.js b/fonts.js index d19940298..3234fa1d3 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);