Cleaning up flex stuff

This commit is contained in:
notmasteryet 2011-10-10 21:00:49 -05:00
parent 2c09fed17c
commit 25f6431607

View File

@ -1715,7 +1715,7 @@ var Type1Parser = function type1Parser() {
var charstring = []; var charstring = [];
var lsb = 0; var lsb = 0;
var width = 0; var width = 0;
var flexState = 0, flexPoints; var flexState = 0;
var value = ''; var value = '';
var count = array.length; var count = array.length;
@ -1783,11 +1783,9 @@ var Type1Parser = function type1Parser() {
switch (subrNumber) { switch (subrNumber) {
case 1: case 1:
flexState = 1; // prepare for flex coordinates flexState = 1; // prepare for flex coordinates
flexPoints = 0;
break; break;
case 2: case 2:
flexState = 2; // flex in progress flexState = 2; // flex in progress
flexPoints++;
break; break;
case 0: case 0:
// type2 flex command does not need final coords // type2 flex command does not need final coords
@ -2317,7 +2315,7 @@ CFF.prototype = {
if (isArray(cmd)) if (isArray(cmd))
charstring.splice(i++, 1, cmd[0], cmd[1]); charstring.splice(i++, 1, cmd[0], cmd[1]);
else if (cmd !== null) else
charstring[i] = cmd; charstring[i] = cmd;
} else { } else {
// Type1 charstring use a division for number above 32000 // Type1 charstring use a division for number above 32000