Skip to content

Commit da53218

Browse files
authored
Merge pull request #1046 from Flamenco/hot_fix_text_scale_and_rotate
Ignore small transform scale values
2 parents ab6066c + 4007178 commit da53218

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/context2d.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@
306306
else {
307307
scale = 1;
308308
}
309-
if (scale === 1) {
309+
// In some cases the transform was very small (5.715760606202283e-17). Most likely a canvg rounding error.
310+
if (scale < .01) {
310311
this.pdf.text(text, x, this._getBaseline(y), null, degs);
311312
}
312313
else {

0 commit comments

Comments
 (0)