Re: layout/screen units mess

From: Martin Sevior (msevior@physics.unimelb.edu.au)
Date: Fri Aug 09 2002 - 01:01:32 EDT

  • Next message: Martin Sevior: "commit: Head. nested Table improvements."

    On Thu, 2002-08-08 at 23:55, Tomas Frydrych wrote:
    >
    > I feel very strongly that before we start even putting out betas for
    > version 2 we have to get rid of the screen/layout units dichotomy.
    > The fact that we do some layout calculations in screen units and
    > some layout calculations in layout units, coupled with the way we
    > scale font metrics from one to the other, is responsible for probably
    > over 90% of our wysiwyg bugs. We have been trying hard to fix
    > many of these for long time, and we are just running in circles.
    >
    > The paradox of it all is that, AFAIK, there is no real reason why we
    > would need both sets of units and at places we just shamelessly
    > scale from one to the other.
    >
    > What I am proposing is that we remove both sets of units and
    > replace them with a single unit system identical to the one used by
    > Pango, where there are 1024 units to a screen pixel. This makes it
    > possible to quickly translate the internal units to screen units and
    > vice versa using shifts, and would provide us with a precision rougly
    > 15 times greater than our layout units do. It would also make the
    > eventual transition to Pango simpler.
    >
    > This would also result in a substantial performance improvement, for
    > measuring character widths is one of the bottlenecks and having
    > single set of units would reduce the processing to half.
    >
    > Now, if anyone has a good reason for keeping to coordinate
    > systems, then please speak up now.
    >

    HI Tomas,
             I haven't followed what you and Joaquin have been doing closely enough
    I guess. The last time I looked we needed to use widths from screen
    coordinates obtained directly from the on-screen glyph sizes to do
    horizontal text layout. We couldn't scale from high resolution printing
    sized glyphs to the screen resolution glyph becaus of hinting info at
    low resolution.

    Has this been fixed now? Where do we currently use high resolution glyph
    sizes to calculate screen layout?

    If this problem is solved I would love to get rid of the
    screen/layout/pango sized calculations and just go with pango units.

    Cheers

    Martin



    This archive was generated by hypermail 2.1.4 : Fri Aug 09 2002 - 01:09:51 EDT