# How can I break textToPoints into lines according to canvas width

**URL:** <https://discourse.processing.org/t/how-can-i-break-texttopoints-into-lines-according-to-canvas-width/38341>\
**Category:** Coding Questions\
**Created:** [August 13, 2022, 10:42am UTC](https://discourse.processing.org/t/how-can-i-break-texttopoints-into-lines-according-to-canvas-width/38341 "2022-08-13T10:42:16Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 15, 2022, 12:18pm UTC](https://discourse.processing.org/t/how-can-i-break-texttopoints-into-lines-according-to-canvas-width/38341/3 "2022-08-15T12:18:20Z")

</div>

> [@Finding the x,y location of a word when text wrapped](https://discourse.processing.org/t/finding-the-x-y-location-of-a-word-when-text-wrapped/38243/5):
>
> thank you! smiling_face_with_three_hearts new version, minor changes // Text box (to replace text() with 5 parameters) with wrapping, so that each word can be separately detected when mouse is over. // Click mouse on a word to get the word via println or hover mouse on a word for the small status bar. // Sketch can be strongly improved // https://discourse.processing.org/t/finding-the-x-y-location-of-a-word-when-text-wrapped/38243 final String txt\_copy = "Nullam feugiat mauris vitae s…

---

_[View the full topic](https://discourse.processing.org/t/how-can-i-break-texttopoints-into-lines-according-to-canvas-width/38341)._
