Chris Bowditch wrote:

<snip/>

The child LM of Line LM is Text LM. It appears that when dealing with just plain text paragraphs, i.e. no fo:inlines or fo:wrapper changing fonts within a line, etc, then there is almost a 1:1 relationship between Line LM and Text LM. So when renderText is called on the renderer it is presented with a whole line of text, and there is no opportunity to insert extra spaces. Unless the renderer is going to break this string and place individual characters, but that to me seems wrong.

So question is should TextLM.getNextBreakPoss be splitting the line into individual words?

Actually after reading the above I realised it was wrong - apologies for wasting bandwidth with my babbling.


The problem isnt that TextLM.getNextBreakPoss isnt finding BPs, problem is with addAreas, which, just skips over all the BPs and creates a single TextArea. This is evident from the following at the start of TextLM.addAreas:

        /* On first area created, add any leading space.
         * Calculate word-space stretch value.
         */
        while (posIter.hasNext()) {
            LeafPosition tbpNext = (LeafPosition) posIter.next();
            ai = (AreaInfo) vecAreaInfo.get(tbpNext.getLeafPos());
            if (iStart == -1) {
                iStart = ai.iStartIndex;
            }
            iWScount += ai.iWScount;
        }

there are no conditions in the while to break out. If no one has any better ideas/suggestions then i'll look at changing this next week.

<snip/>

Chris




Reply via email to