Skip to content

Commit 590c6c4

Browse files
committed
Merge pull request mozilla#1978 from yurydelendik/issue-1655
Fixes bias calculation for type2 subr
2 parents 7acbe15 + 477ca87 commit 590c6c4

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/fonts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4043,9 +4043,9 @@ Type1Font.prototype = {
40434043
getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) {
40444044
var bias = 0;
40454045
var count = type1Subrs.length;
4046-
if (count < 1240)
4046+
if (count < 1133)
40474047
bias = 107;
4048-
else if (count < 33900)
4048+
else if (count < 33769)
40494049
bias = 1131;
40504050
else
40514051
bias = 32768;

test/pdfs/issue1655.pdf.link

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
http://bblum.net/thesis-draft.pdf

test/test_manifest.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,15 @@
515515
"link": true,
516516
"type": "eq"
517517
},
518+
{ "id": "issue1655",
519+
"file": "pdfs/issue1655.pdf",
520+
"md5": "696ef6de6f4f71643771419ef04fc968",
521+
"rounds": 1,
522+
"skipPages": [1, 2, 3, 4, 5, 6, 7, 8],
523+
"pageLimit": 9,
524+
"link": true,
525+
"type": "eq"
526+
},
518527
{ "id": "issue1133",
519528
"file": "pdfs/issue1133.pdf",
520529
"md5": "d1b61580cb100e3df93d33703af1773a",

0 commit comments

Comments
 (0)