Merge pull request #2630 from yurydelendik/width-cid
Fixes reading of the widths for CID fonts
This commit is contained in:
commit
4a19437537
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1
test/pdfs/issue2627.pdf.link
Normal file
1
test/pdfs/issue2627.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
http://borel.slu.edu/pub/metanet.pdf
|
@ -824,6 +824,15 @@
|
||||
"link": true,
|
||||
"type": "load"
|
||||
},
|
||||
{ "id": "issue2627",
|
||||
"file": "pdfs/issue2627.pdf",
|
||||
"md5": "1b6b2f19f4e1e1b926afb353b41fe6b2",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"firstPage": 4,
|
||||
"lastPage": 4,
|
||||
"type": "load"
|
||||
},
|
||||
{ "id": "issue1878",
|
||||
"file": "pdfs/issue1878.pdf",
|
||||
"md5": "b4fb0ce7c19368e7104dce3d0d34bcb3",
|
||||
|
Loading…
x
Reference in New Issue
Block a user