Hi, 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, e.g. 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 inline). That is when get to the end of processing the first sequence "start text ( " I need to be able to determine if there is a break between the last character of this text fragment and the start of the next fragment. In this example the space at the end of the first fragment and the 'm' starting the nested inline. The same applies at the end of the inline. I need to be able to determine if there is a break between the 't' at the end and the starting character of the final fragment. Given the nested structure of our layout managers I haven't found an elegant way of doing this. Any ideas, suggestions? Manuel