Give the line of each piece of a text, from their widths, for
a maximum width. This is the part shared by gen_grob() and the packages that
draw rich text with 'grid'.
A piece that makes the line too wide goes to the next line, except if it is
the first of its line. Spaces are dropped when they do not fit and at the start
of a line that follows an automatic line break; they are kept after a line
break of the text, as they were written. A line break ends its line, and gives
a line of its own if that line is empty.
A word wider than a line is first moved to a new line, then split between
its characters: give its characters as pieces and set break_before to TRUE
on the first one.