On Dec 27, 2006, at 13:35, Manuel Mall wrote:


I have reached a bit of mental block in coming up with a simple design
to solve the following problem and looking for some ideas here:

The UAX#14 line breaking algorithm works fundamentally on pairs on
neighboring characters possibly separated by whitespace. The current
implementation in FOP is restricted running the algorithm on a single
consecutive sequence of characters (TextLayoutManager) not interupted
by any markup. To make the algorithm work across markup boundaries,

start text ( <fo:inline ...>middle text</fo:inline> ) end text

I need to be able to get to the first character of the next (nested
<snip />
Given the nested structure of our layout managers I haven't found an
elegant way of doing this. Any ideas, suggestions?

If you look only at the char arrays, you can't look across FO boundaries, but if you use the FOText instances, then you do have access to the previous and next FOText instances in the same block. Maybe that helps? Currently, those pointers are only used while applying text-transform.

Only problem are possibly intermixed fo:characters...

Maybe there's a possibility to re-use the existing CharIterators in the fo package?



Reply via email to