File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,9 +86,9 @@ class LineWrapper extends EventEmitter {
8686
8787 canFit ( word , w ) {
8888 if ( word [ word . length - 1 ] != SOFT_HYPHEN ) {
89- return w <= this . spaceLeft ;
89+ return PDFNumber ( w ) <= PDFNumber ( this . spaceLeft ) ;
9090 }
91- return w + this . wordWidth ( HYPHEN ) <= this . spaceLeft ;
91+ return PDFNumber ( w + this . wordWidth ( HYPHEN ) ) <= PDFNumber ( this . spaceLeft ) ;
9292 }
9393
9494 eachWord ( text , fn ) {
@@ -119,7 +119,7 @@ class LineWrapper extends EventEmitter {
119119 while ( word . length ) {
120120 // fit as much of the word as possible into the space we have
121121 var l , mightGrow ;
122- if ( w > this . spaceLeft ) {
122+ if ( PDFNumber ( w ) > PDFNumber ( this . spaceLeft ) ) {
123123 // start our check at the end of our available space - this method is faster than a loop of each character and it resolves
124124 // an issue with long loops when processing massive words, such as a huge number of spaces
125125 l = Math . ceil ( this . spaceLeft / ( w / word . length ) ) ;
You can’t perform that action at this time.
0 commit comments