On Mon, Nov 11, 2002 at 01:35:55PM -0500, David A. Desrosiers wrote:
>       Related to the above bug, I had a thought.. what if we set a
> "bookmark" (invisible to the user) to the location in the page that the user
> is at when they try to change the font, then when they change the font and
> the page redraws, go back to that "bookmark" (instead of the top of the
> page), and remove it, thus restoring the position they were at prior to
> changing the font. That would seem to solve the problem with starting back
> at the top when changing fonts, no? What other menu functions would force a
> redraw? Disabling images, changing bpp, etc... can we just stub this into
> some of the form events?

Can't do it. The bookmarks store everything with an offset. For
example, if you're viewing a page that has 10 paragraphs in it, and
while reading paragraph 5 you set a bookmark. That bookmark is created
with a Y-offset of, say, 200.

When you view the bookmark, the display is automatically pushed down
to the 200th pixel into the text. But, when you change your font
around, the value of 200 remains constant and will still go to the
200th pixel, but there is no guarantee that that'll be anywhere close
to the actual text you want.

I suppose some logic could be added into this, nothing complicated
ofcourse but we could figure this out roughly. If we know the height
of the font before and after, take that into account by deviding it
into our our current Y offset, and we could make a rough guestimation
on where the user is supposed to be, In theory.

-- 
Adam McDaniel
Array.org
Calgary, AB, Canada
_______________________________________________
plucker-dev mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-dev

Reply via email to