Skip to content

Commit

Permalink
Fix word spacing after justified text (#3168)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonPrins authored May 21, 2021
1 parent f41a18f commit 99d4b95
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jspdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3862,6 +3862,8 @@ function jsPDF(options) {
)
)
);
} else {
wordSpacingPerLine.push(0);
}
text.push([da[l], newX, newY]);
}
Expand Down
Binary file modified test/reference/textLinkWithAlignOptions.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions test/specs/jspdf.unit.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,7 @@ break`,
"12.84 Tw",
"28.35 813.54 Td",
"(This is a) Tj",
"0 Tw",
"0. -18.4 Td",
"(test.) Tj",
"ET"
Expand Down

0 comments on commit 99d4b95

Please sign in to comment.