commit: Re: Text layout bugs. (plus fix for 2313?)


Subject: commit: Re: Text layout bugs. (plus fix for 2313?)
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sat Jan 05 2002 - 09:39:24 CST


CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: src/text/fmt/xp/fl_BlockLayout.cpp
CVS: ----------------------------------------------------------------------
kludge in fl_BlockLayout.cpp.cpp::format(..) to fix some layout bugs.

This basically adds the line
m_bFixCharWidths = true
and sets bool bDoIt = true

so that the entire paragraph has all run widths recalculated on every
format. This is a massive kludge but if I do this I get no more layout
bugs.

For those you who can reproduce 2313 please try again after this
commit.

I would love a better fix for this but it appears that there is a corner
case flaw somewhere in the logic that decides which runs should have their
widths recalculated and I can't figure out the logic.

Sorry.

Martin

 On Sat, 5 Jan 2002, Martin Sevior wrote:

>
>
> On Sat, 5 Jan 2002, Tomas Frydrych wrote:
>
> >
> > > To see what I mean type in about 4 lines of text in full
> > > justification. Then delete a character in one word, then press undo.
> > > This sometimes results in strange behaviour.
> > I cannot create any problem this way, even though I have been
> > trying for a while.
> >
>
>
> It takes a while but with enough effort you can get the charWidths out of
> synch with the text in runs. The result is very bizarre behaviour. The
> cursor skips past characters it should move to. I can do it with a 4 line
> document. I created the 4 lines by typing some text then cutting it and
> pasting it several times. I belive the bug surfaces following the
> splitting of runs. It doesn't need to be full justification. Try deleting
> the space between two words on line 3 of a four line document then undoing
> it, then deleting the space again and finally changing the font size to 18
> or something.
>
> After playing with gdb I can fix the problem by manually setting
> m_bfixChars = true in fl_BlockLayout.cpp:format
>
> > I am fairly certain that 2313 is not caused by the layout engine per
> > se, but the PS classes.
> >
>
> It could be but I'm now also seeing incorrect text width calculations that
> appear to go hand in hand with the above bug. It's like the widths of two
> characters were added together for one character. I haven't actually
> managed to to reproduce 2313 yet.
>
> Cheers
>
> Martin
>
>
>
>



This archive was generated by hypermail 2b25 : Sat Jan 05 2002 - 09:39:38 CST