Re: AbiWord's printing architecture

From: Martin Sevior (msevior@physics.unimelb.edu.au)
Date: Fri Jan 24 2003 - 18:42:25 EST

  • Next message: Andrew Dunbar: "Re: commit (HEAD): miscel."

    On Sat, 25 Jan 2003, Robert Roebling wrote:

    >
    > > 1) Our own PS generator
    > > 2) A driver based on GnomePrint
    > >
    > > I'm working on making #2 functional again. If
    > > wxWindows can have a Gnome dependency, I *highly*
    > > recommend using libgnomeprint and libgnomeprintui
    > > versions 2.2.x
    >
    > Dependancy on the infamous 200 Gnome libraries
    > is currently no option for wxWindows. It may be
    > less of a problem for a "single app" project
    > like AbiWord.
    >
    > > So, our printing is done in a fashion very
    > > similar to on-screen drawing, or how your
    > > "device contexts" work. (..)
    > > Pretty much all of these have a 1:1 mapping
    > > onto PS and PDF drawing operations.
    >
    > Yes I know, we alredy can print to PS, it's just
    > not yet optimal.
    >
    > > Now, one can't use Pango to print, at least
    > > not yet.
    >
    > Well, we do :-) I just tell the FreeType backend
    > of Pango to produce outlines of the rendered
    > text and write these to the PS file. I have
    > to work on scaling, but the text is there
    > including CJK without having to embed 7.5Mb
    > fonts in the PS file.
    >
    > > so that we can embed the font directly in the
    > > PS output, instead of merely referencing it by name.
    > > See any PS or PDF manual for what that means.
    >
    > I actually read both and I'm fairly familiar with
    > both concepts. The problem is that you would have
    > to embed megabytes of data for a Japanese font.
    > If I am not mistaken, OpenOffice and Qt are both
    > able to embed only individual glyphs to avoid that
    > problem. Unfortunately, this is beyond my knowledge
    > of PostScript.
    >
    > > Now, we use Xft2/FontConfig if possible to get
    > > the font metrics and font files themselves.
    >
    > Yes, I know. But what about ligatures or more
    > exotic scripts? You need shapers for them or
    > the text won't look ideal. Everyone can print
    > "Hello" in PostScript :-)
    >
    > > Xft2/Fontconfig is installed and have a way
    > > to convert text to UTF8 or UCS4,
    >
    > We have both in wxWindows.
    >
    > > it's pretty trivial to craft a fairly
    > > functional PS driver device context.
    >
    > I know since I have written most of the current
    > PS driver for wxWindows, but "fairly" funtional
    > is not always enough. Once again, I still
    > hesitate to throw away Pango until I see any
    > real reason to do so. Since AbiWord has much
    > more experience with printing issues, I am
    > raising the issue here.
    >
    > BTW, does AbiWord handle the problem that text
    > can have a differnt size/length depending on the
    > resolution? Printers obviously have far higher
    > resolutions and this can in rare cases affect
    > line break algorithms.
    >

    If you read the archives for today, yesterday and the day before you can
    see we're currently dealing with this tricky problem. We haven't got it
    beaten yet though.

    Cheers

    Martin



    This archive was generated by hypermail 2.1.4 : Fri Jan 24 2003 - 18:45:27 EST