Soft hyphens and no-break spaces
A justified column set twice: the long words breaking at their soft hyphens with a hyphen shown, or left whole, and a figure a no-break space keeps together.
JSON
write_soft_hyphen.json
98 lines
This one is not a program. It is the request the document server is sent: the same page, asked for over the network by an application that writes no PDF code at all.
The library writes the paragraph once and takes the soft hyphens out of it for the upper panel; the request writes it out twice, the upper one already without them. The height of each panel is a number the library measures off the lines it has just set, so that the frame closes on the last of them; here it is typed in, and would have to be typed in again if a word changed.