Skip to content

Commit 6233c7a

Browse files
committed
Convert points to pixels when calculating width
1 parent 36ede75 commit 6233c7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugins/context2d.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,8 @@
12511251
getWidth: function () {
12521252
var fontSize = pdf.internal.getFontSize();
12531253
var txtWidth = pdf.getStringUnitWidth(text) * fontSize / pdf.internal.scaleFactor;
1254+
// Convert points to pixels
1255+
txtWidth *= 1.3333;
12541256
return txtWidth;
12551257
},
12561258

0 commit comments

Comments
 (0)