Some days ago, Manuel Mall wrote:

The problem is that the Inline LM doesn't calculate the dimension of the area it is suppose to construct from the subsequence given to it by the Line LM. Instead it just assumes the dimension of the line as given to it in the LayoutContext.

However, to be able to do the required calculations the Inline LM would need access to the KnuthElements of the subsequence it is suppose to construct the area for. However, what's given to it is a sequence of KnuthPositions (the standard addAreas() interface) not elements.

Maybe there is no need for the InlineLM to know the elements, or for the LineLM to compute the height of each inline: the LeafNodeLM (and its subclasses) already set their areas bpd according to the font ascender and descender.

So, InlineLM.addAreas() could check the bpd of its inline children after adding them, and choose the larger one, which could be smaller than the line height.

Or am I missing something important?

Regards
    Luca

Reply via email to