10. The system of claim 1 , further comprising a display device, the operations further comprising displaying on the display device one or more line layouts prepared in accordance with the justification penalty.
1. A system comprising: one or more computers; and a computer program product tangibly embodying software which when executed cause the one or more computers to perform operations comprising: determining an aggregate space expansion or space compression that would lay out a text line having a plurality of consecutive words to a particular length; and determining a justification penalty, the justification penalty value being a function of at least the aggregate space expansion or space compression and the number of inter-word spaces in the text line.