Summarizing, you mean that
1. the layout system should calculate the justification and add corresponding word and space areas to the area tree;
Eh, not quite. The problem is that the actual justification can only be done after page number citations have been resolved. Furthermore, as you noted, for certain output formats justification can be left to the viewer in some circumstances (remember reference aligned leaders - I don't think there is any format which can deal with this in justified text). I'd like to have the following: - The layout does whitespace processing, computes line and word breaks and creates a corresponding area tree. - The renderers call a layout routine doing the justification before rendering the line. In case the output format can deal with the needed justifications at hand itself, the renderers may emit the appropriate commands to the output without calling the layout routing for justification, as a form of optimization.
2. the area hierarchy should be revised to make it as light-weight as possible, to minimize resource consumption.
Oh, certainly, with priority on the Area objects which occur most often and lock up the largest amount of memory.
J.Pietschmann