From 6460ffcd253f9bf441a1317d7ddcdcffb80b5df0 Mon Sep 17 00:00:00 2001
From: Vivien Nicolas <21@vingtetun.org>
Date: Wed, 24 Aug 2011 17:26:14 +0200
Subject: [PATCH] Remove div arguments once used for lsb

---
 fonts.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fonts.js b/fonts.js
index 9dc739796..9b306ff0e 100755
--- a/fonts.js
+++ b/fonts.js
@@ -1486,19 +1486,21 @@ var Type1Parser = function() {
           if (value == 13) {
             if (charstring.length == 2) {
               lsb = charstring[0];
+              charstring.splice(0, 1);
               width = charstring[1];
             } else if (charstring.length == 4 && charstring[3] == 'div') {
               lsb = charstring[0];
+              charstring.splice(0, 1);
               width = charstring[1] / charstring[2];
             } else if (charstring.length == 4 && charstring[2] == 'div') {
               lsb = charstring[0] / charstring[1];
+              charstring.splice(0, 3);
               width = charstring[3];
             } else {
               error('Unsupported hsbw format: ' + charstring);
             }
 
             charstring.push(lsb, 'hmoveto');
-            charstring.splice(0, 1);
             continue;
           }
           command = charStringDictionary[value];