Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds. Spaces are not collapsed and whitespace is not trimmed.
name | type | description |
---|---|---|
text | string |
The text to perform word wrap detection against. |
context | CanvasRenderingContext2D |
The Canvas Rendering Context. |
wordWrapWidth | number |
The word wrap width. |
The wrapped text.