Re: resolution and zoom issues

From: Leonard Rosenthol (leonardr@lazerware.com)
Date: Tue Apr 30 2002 - 16:02:13 EDT

  • Next message: Paul Rohr: "dumb printing question (was Re: resolution and zoom issues)"

    At 8:44 PM +0100 4/30/02, Tomas Frydrych wrote:
    >Yes, we will need to patch Pango. There are two ways we can
    >approach zooming. If we tell FT to produce the glyphs at the same
    >point size but at twice the resolution than the screen has, we will
    >get a bitmap that corresponds to 200% zoom.

            Yes, but you will get metrics that aren't necessary scaled
    appropriately - and you'll continue to get the same problems that you
    are experiencing today.

    > Patching Pango to
    >allow us to change the resolution is very simple and we will have to
    >do it anyway to be able to generate PostScript.

            Shouldn't have anything to do with PS...

    >The other option is to use the transform functions in FT,

            And this is what we should be doing...

    > which
    >would allow us to do other transformations than linear zooming
    >when we want to;

            Yes, though not necessarily important today (though maybe in
    the future for things like rotated text cells, etc.)

    >again, adding the api to Pangoft2 for this would
    >be straight forward, but I have to confess I havn't got a clue how to
    >use the transform matrix and vector.
    >

            Scaling is easy. A 2x3 affine matrix (which is what
    Postscript, PDF, SVG, FreeType, etc. all use) is setup with the base
    matrix as [ 1 0 0 1 0 0 ], where the 1's represent the scaling
    factor. So to zoom, you just change that to [ scaleX 0 0 scaleY 0 0
    ] and away you go.

    LDR

    -- 
    ---------------------------------------------------------------------------
    Leonard Rosenthol                            <mailto:leonardr@lazerware.com>
                          			     <http://www.lazerware.com>
    


    This archive was generated by hypermail 2.1.4 : Tue Apr 30 2002 - 16:04:33 EDT