Re: gtkmathview/abiword.

From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Thu May 09 2002 - 23:48:31 EDT

  • Next message: Andrew Dunbar: "Re: newer press release"

    This email came from Luca Padovani, main author of GtkMathView, a
    GtkWidget to display MathML. I'm posting my reply here with Luca's
    permission.

    Luca will be lurking here for a while so feel free to ask him about his
    very cool project. GtkMathView uses an abstract graphics class for actual
    drawing just as we do. He also faces the same font challenges we have for
    complex scripts in making beautiful Maths displays.

    Cheers

    Martin

    ---------- Forwarded message ----------
    Date: Fri, 10 May 2002 11:36:03 +1000 (EST)
    From: Martin Sevior <msevior@mccubbin.ph.unimelb.edu.au>
    To: Luca Padovani <padovani@scl.csd.uwo.ca>
    Subject: Re: gtkmathview/abiword

    On Thu, 9 May 2002, Luca Padovani wrote:

    >
    > Martin,
    >
    > I remember you had a look inside gtkmathview and as an abiword developer I
    > guess you have some knowledge of it.
    > Thinking about an eventual integration of the two projects, and also about
    > some curiosities I've always had, here are some questions:

    Hi Luca,
            yes indeed. I'm looking forward to integrating these
    projects. Joaquin Cuenca Abela is also on your mailing list and detailed
    knowledge of abiword too. Please feel free to join and post to
    abiword-dev@abisource.com. The traffic volume is rather high I'm afraid
    but it is certainly the best way to get integrations issues ironed out.

    >
    > - what's the granularity of objects for an abiword document? I mean,
    > there must be a correspondence between entities seen on the screen and
    > internal objects. Is there an object allocated for every char, or every
    > word, or every paragraph... how does that work?
    >

    The basic object is a "run" of text with contiguous properties. So text
    with identical font/italic,size etc. Our runs have many subclasses. text
    runs, image runs, tab runs, field runs, hyperlink runs, etc. We could
    easily have a maths run rendered by GtkMathView too. These are emebdded in
    lines. The next gernation layout that we're building now will allow lines
    to be embeded in tables/text frames etc. But right now they're just layed
    out one after the other in rectangular column.

    > - about graphics contexts. Do you have a different GC allocated in each
    > object, or you have only one and every time you go thru the rendering
    > process you change the context and then you restore the previous values?
    >

    We have one graphics context per frame. We use a model very much like your
    own. We have an abstract base-class and platform and printing
    subclasses. Our graphics base class can display images. The actual
    rendering of images is handled by subclasses. At present we have
    implemented display and printing for png images. We have hooks in place
    for SVG images although this has not been implemented yet.

    > - how fine-grained is the support for bonobo-components?
    >

    This has not yet been implemented but is straight forward. I think the
    bonobo-components will be implemented at the run level like our present
    images.

    For maths support I think we should delegate all maths drawing to
    GtkMathView and allow GtkMathView to draw directly onto rectantular
    regions of the screen. These can then be either embedded in regular runs
    or take up many effective lines. I think there will have to be some
    communication between abiword and gtkMathML so we can do things like
    display equation numbers and get consistency with line spaces etc.

    It might be that bonobo is not sufficient for this. Aparently the two way
    negotiation between Gnumeric/Guppi neded to transfer data and display it
    was very testing to the bonobo framework. These projects are working on
    plugin architecture to improve things. This will be available to all
    gnome-office apps. I think until we try bonobo we won't know. Certaintly
    my experiences with it so far have been very positive. It's actually very
    easy to turn and existing widget into an embedable bonobo component. The
    hardest part in AbiWord was to actually turn it into a
    GtkWidget. Bonobo-izing it was quite straight forward after that. I wish I
    had the time to try it with GtkMathML :-(

    > I know I could dig into the source code and find the answers myself, but
    > hopefully you'll be able to redirect me into the right files within the
    > fairly large repository.
    >

    I know *exactly* how you feel. I thought the same when I first stated on
    abiword and it recurred when looked at the GtkMathML project :-)

    I'm very happy to answer your questions. Feel free to ask.

    I'd like to cross post this message o Abiword-dev. Do you mind?

    Cheers

    Martin



    This archive was generated by hypermail 2.1.4 : Thu May 09 2002 - 23:51:28 EDT