mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
Avoid unnecessarily breaking inside words when using continued
`continued` is implemented by temporarily shortening the lineWidth, which can cause the linewrapper to break inside words when that's not really necessary.
This commit is contained in:
parent
3842f6b7da
commit
1a5df016ce
@ -64,7 +64,7 @@ class LineWrapper extends EventEmitter
|
||||
|
||||
# if the word is longer than the whole line, chop it up
|
||||
# TODO: break by grapheme clusters, not JS string characters
|
||||
if w > @lineWidth
|
||||
if w > @lineWidth + @continuedX
|
||||
# make some fake break objects
|
||||
lbk = last
|
||||
fbk = {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user