PATCH: Fix for an underlining bug.


Subject: PATCH: Fix for an underlining bug.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sat Mar 18 2000 - 07:18:46 CST


HI,
        Abi's underlining code has a bug that has been bothering me for a
while. To see it.

1. Take a string of text.
2. Go to superscript mode and insert text.
3. Underline the original text and the superscript text.

The underline moves up underneath the superscript text. This almost always
not what you want which would be to have the underline continue along
underneath the superscript at the same level as the underline of the
original text. Further more if the height of the original text is large
enough to trigger a change of the width of the underline the underline
under the superscript may be thinner. There is a similar bug for overline
too - which is actually how I noticed the problem.

After some thought I believe that what a user typically wants is a single
straight line underneath all the text included in an underline.

Fixing this bug meant a substantial enlargment of the fp_run.* and
fp_textrun.* code since it is only possible to know where to put an
underline AFTER an underline (or overline) is specified. The underline
could easily extend of a number of text runs. So now underlines are only
drawn after a underline is completed. In the case where an underline is
not drawn the NEXT text run is marked as dirty for a redraw until the end
of the underline is completed.

This code is only for the cross platform display presently. I will fix the
Unix printing code shortly to include this new behaviour.

Cheers

Martin




This archive was generated by hypermail 2b25 : Sat Mar 18 2000 - 07:18:56 CST