Fixes reading of the widths for CID fonts
This commit is contained in:
parent
7f8ec9c48e
commit
b5a38ded4c
@ -1030,20 +1030,16 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||||||
|
|
||||||
var widths = dict.get('W');
|
var widths = dict.get('W');
|
||||||
if (widths) {
|
if (widths) {
|
||||||
var start = 0, end = 0;
|
|
||||||
for (var i = 0, ii = widths.length; i < ii; i++) {
|
for (var i = 0, ii = widths.length; i < ii; i++) {
|
||||||
|
var start = widths[i++];
|
||||||
var code = xref.fetchIfRef(widths[i]);
|
var code = xref.fetchIfRef(widths[i]);
|
||||||
if (isArray(code)) {
|
if (isArray(code)) {
|
||||||
for (var j = 0, jj = code.length; j < jj; j++)
|
for (var j = 0, jj = code.length; j < jj; j++)
|
||||||
glyphsWidths[start++] = code[j];
|
glyphsWidths[start++] = code[j];
|
||||||
start = 0;
|
} else {
|
||||||
} else if (start) {
|
|
||||||
var width = widths[++i];
|
var width = widths[++i];
|
||||||
for (var j = start; j <= code; j++)
|
for (var j = start; j <= code; j++)
|
||||||
glyphsWidths[j] = width;
|
glyphsWidths[j] = width;
|
||||||
start = 0;
|
|
||||||
} else {
|
|
||||||
start = code;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user