Fixes reading of the widths for CID fonts

This commit is contained in:
Yury Delendik 2013-01-29 17:19:08 -05:00
parent 7f8ec9c48e
commit b5a38ded4c

View File

@ -1030,20 +1030,16 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
var widths = dict.get('W');
if (widths) {
var start = 0, end = 0;
for (var i = 0, ii = widths.length; i < ii; i++) {
var start = widths[i++];
var code = xref.fetchIfRef(widths[i]);
if (isArray(code)) {
for (var j = 0, jj = code.length; j < jj; j++)
glyphsWidths[start++] = code[j];
start = 0;
} else if (start) {
} else {
var width = widths[++i];
for (var j = start; j <= code; j++)
glyphsWidths[j] = width;
start = 0;
} else {
start = code;
}
}
}