From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sun Apr 28 2002 - 05:38:38 EDT
On Sun, 28 Apr 2002, Tomas Frydrych wrote:
>
> Hi Martin,
>
> I was wondering whether in the rewrite of the layout engine we
> might be able to get rid off the "screen width" / "layout width"
> duality by doing all our width calculations at a very high resolution
> and then scaling them down for screen operations. It seems to me
> that most of our calculations are done in layout units anyway.
> What do you think?
>
Hi Tomas,
The only need for calculations at screen resolution is for laying
our text into lines. If you use high resolution for on screen calculation
different runs end up being overlapped. I'm sure you've seen this. This is
a real problem especially with say an italic run being followed by a run
of bold text.
I'd kind of hoped that a sophisticated line layout system like
Pango/Freetype could solve these issues and get kerning to work too. From
your reading of these libraries do you if that is true?
In addition we have issues with screen dirt since clearScreen clears
rectangular areas and some italic fonts have pixels outside their
rectangular enclosures. You and I have fought against this with special
case code to detect this. I can think of several ways to improve this.
My favourite is to clear one char ahead and behind a run the redraw just
that character.
This would allows us to have arbitary backgrounds like pixmaps or shading
instead of just solid colour like now. The clearscreen method would just
overwrite the background pixmap.
We'd also have to worry about borders but that could be taken care of.
Thomas Flecher suggested that layout should be done with floating point
calculations. I think I prefer that screen and print layout is done at the
one high resolution setting. If we do it right we're gaurenteed to get
perfect WYSIWYG for lines per page. If we could find a way to make it work
for horizontal text layout we'd get it for the width too.
Anyway those are my thoughts. I'd be very interested in your ideas on
these points.
Cheers
Martin
This archive was generated by hypermail 2.1.4 : Sun Apr 28 2002 - 05:40:29 EDT