Several members of the layout team got together last month to talk about optimizing bidi resolution. bz took some notes, I figured I'd post them here for general consumption / archival.
~fantasai On 12/8/2009 2:24 PM, Boris Zbarsky wrote: > Decided: > > 1) Store the bidi embedding level at the end of each line box at the > end of each line box. > 2) On insert/append walk backwards through neutral characters looking > for the right place to start reresolving the bidi runs. And > forward looking for a place to stop. Do this at frame-insertion > time. > 3) Need a "line needs bidi resolution" bit. The walk in item #2 would > set this bit on the lines it walks over, and stop once hitting a > line with the bit. > 4) Roc will find a victim. > 5) Treat <br> and LF as line breaks. Treat empty lines in <pre> as > paragraph separators. Or something. > > -Boris Simon Montagu wrote: > I want to think in a bit more detail about the "or something" in point > 5 above. Assuming that there's no sane way to identify reliably which > line breaks in preformatted text are really line separators and which > are really paragraph separators, I tend to believe that we should err > in the direction of paragraph separators, probably to the extent of > treating all line breaks as paragraph separators. > > This is because I think the potential misrendering caused by treating > paragraph separators as line separators will usually be much worse > than the opposite case. Cases like numbered lists or tabular data in > plain text can become totally unreadable if the line breaks are > interpreted as line separators, but I think if line breaks in running > text are interpreted as paragraph separators the text can end up > looking a little squiffy, but it never reaches the point of unreadability. _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

