From f48ab3cfd1fd81eaed522adae5023173f1a76902 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas <21@vingtetun.org> Date: Wed, 24 Aug 2011 17:18:56 +0200 Subject: [PATCH] Support lsb div format --- fonts.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fonts.js b/fonts.js index 9049255e7..9dc739796 100755 --- a/fonts.js +++ b/fonts.js @@ -1485,14 +1485,18 @@ var Type1Parser = function() { // TODO Clean this code if (value == 13) { if (charstring.length == 2) { + lsb = charstring[0]; width = charstring[1]; } else if (charstring.length == 4 && charstring[3] == 'div') { + lsb = charstring[0]; width = charstring[1] / charstring[2]; + } else if (charstring.length == 4 && charstring[2] == 'div') { + lsb = charstring[0] / charstring[1]; + width = charstring[3]; } else { error('Unsupported hsbw format: ' + charstring); } - lsb = charstring[0]; charstring.push(lsb, 'hmoveto'); charstring.splice(0, 1); continue;